Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 language

This 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