/Mini_Shell-Ubuntu

This is a simple shell program developed in C++. It provides a command-line interface for executing various commands and performing file operations. The shell supports basic functionalities such as executing commands, managing files and directories, displaying system information, and more.

Primary LanguageC++

Mini Shell

This is a simple shell program developed in C++. It provides a command-line interface for executing various commands and performing file operations. The shell supports basic functionalities such as executing commands, managing files and directories, displaying system information, and more.

Getting Started

To get started with the mini shell, follow these instructions:

  1. Clone the repository or download the source code.
  2. Compile the mini_shell.cpp file using a C++ compiler.
  3. Run the compiled executable file.

Usage

Once you have the mini shell running, you can enter commands to perform different operations. The following commands are supported:

  • pwd: Print the current working directory.
  • help: Display the list of available commands.
  • exit: Exit the shell.
  • date: Display the current date and time.
  • echo <message>: Print a message to the terminal.
  • mkdir <directory>: Create a new directory.
  • rm <file>: Remove a file.
  • env: Display the system environment variables.
  • list: List files and directories in the current directory.
  • change <directory>: Change the current directory.
  • copy <source> <destination>: Copy a file.
  • rename <old_name> <new_name>: Rename a file.
  • perm <file>: Show the permissions of a file.
  • size <file>: Show the size of a file.
  • count <file>: Show the number of lines in a file.
  • read <file>: Display the contents of a file.
  • write <file> <content>: Overwrite content to a file.
  • append <file> <content>: Append content to the end of a file.
  • search <file>: Search for a file in the current directory.
  • swap <file1> <file2>: Swap the contents of two files.
  • pipe: Example of pipe command using a forked process.

Contributing

Contributions to this project are welcome. If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

Acknowledgments

This project was developed as a learning exercise and is based on the concepts of operating systems and file operations. It demonstrates the use of system calls, process management, file handling, and other basic functionalities of a shell program.

Contact

If you have any questions or feedback, you can reach out to the project maintainer:

Name: Ali Awais Safdar
Email: asafdar.bscs21seecs@seecs.edu.pk