Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kshru9/basic-shell
Basic shell commands written in C language
https://github.com/kshru9/basic-shell
c execvp fork grep makefile operating-system shell
Last synced: 5 days ago
JSON representation
Basic shell commands written in C language
- Host: GitHub
- URL: https://github.com/kshru9/basic-shell
- Owner: kshru9
- Created: 2020-09-07T12:02:46.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-20T06:26:33.000Z (about 3 years ago)
- Last Synced: 2024-10-12T12:12:36.681Z (about 1 month ago)
- Topics: c, execvp, fork, grep, makefile, operating-system, shell
- Language: C
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Work in Repl.it](https://classroom.github.com/assets/work-in-replit-14baed9a392b3a25080506f3b7b6d57f295ec2978f6f33ec97e36a161684cbe9.svg)](https://classroom.github.com/online_ide?assignment_repo_id=3009701&assignment_repo_type=AssignmentRepo)
# Assignment1
## shell program in C languageThis repository contains basic shell commands of linux operating system implemented in C language.
The list of commands are:
* ls --> list the contents of given directory or current working directory if no directory name passed
* Cp --> copies file to file, multiple files to directory and directory to directory
* Cd --> change the current working directory
* rm --> removes a file or a directory having multiple files and directories
* Mkdir --> makes a directory of given pathname
* grep --> It matches a search term in a file or multiple files and prints that line. If empty search term given, matches nothing. If no file name given, matches search term from standard input
* Pwd --> prints present working directory
* Mv --> It moves multiple files in a directory. It makes a new file and copy contents to destination file when two files are given in argument.
* cat --> displays the content of a file or multiple files in the terminal.
* Chmod --> changes the permission of file or directory given a octal representation of permissions.* The shell also runs builtin binaries like ps, pmap, etc of a command line
## how to run the shell:
- `fork` the repo from top right corner of the screen
- Download/Clone the forked repo
- Run `make` in the terminal to start the shell process
- Try out any of the above commands in the shell process
- Use `Ctrl + C` to exit the shell process