Skip to content

kshru9/Basic-Shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Work in Repl.it

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

Releases

No releases published

Packages

No packages published