|
1 |
| -# Python-Terminal |
2 |
| -This is a Unix like terminal made in python. |
| 1 | +# **Python Terminal** |
| 2 | + |
| 3 | +A Python-based Linux terminal simulation that allows users to execute basic file system commands within a virtual environment. Includes support for file management, directory navigation, and command aliases. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## **Features** |
| 8 | +- **File System Management**: |
| 9 | + - Create folders and files (`mkdir`, `touch`). |
| 10 | + - List directory contents (`ls`). |
| 11 | + - Read and delete files (`read`, `rm`). |
| 12 | + - Rename files or folders (`mv`). |
| 13 | + - Navigate directories (`cd`, `cd ..`, `pwd`). |
| 14 | + - Delete folders (`rmdir`). |
| 15 | +- **Aliases**: |
| 16 | + - Define custom aliases for frequently used commands (`alias`). |
| 17 | + - Remove aliases (`unalias`). |
| 18 | + - Save and load aliases automatically. |
| 19 | +- **Help Menu**: |
| 20 | + - View all available commands using the `help` command. |
| 21 | +- **Persistence**: |
| 22 | + - Virtual file system and aliases persist across sessions. |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +## **Installation** |
| 27 | + |
| 28 | +### **Prerequisites** |
| 29 | +- Python 3.6 or higher. |
| 30 | + |
| 31 | +### **Steps** |
| 32 | +1. Clone the repository: |
| 33 | + ```bash |
| 34 | + git clone https://github.com/Ruben2163/Python-Terminal.git |
| 35 | +1. Run Main.py: |
| 36 | + ```bash |
| 37 | + python3 main.py |
| 38 | +--- |
| 39 | +## **Basic commands** |
| 40 | +
|
| 41 | +| Commands|Usage| |
| 42 | +| -------|------------------ | |
| 43 | +| mkdir <folder_name>|Create a folder.| |
| 44 | +|touch <file_name>| Create a file.| |
| 45 | +|ls |List contents of the current directory.| |
| 46 | +|read <file_name> |Display the content of a file.| |
| 47 | +|rm <file_name> |Delete a file.| |
| 48 | +|rmdir <folder_name> |Delete a folder.| |
| 49 | +|mv <old_name> <new_name> |Rename a file or folder.| |
| 50 | +|cd <folder_name> |Navigate to a directory.| |
| 51 | +|cd .. |Go to the parent directory.| |
| 52 | +|pwd |Print the current working directory.| |
| 53 | +|help |Display the help menu.| |
| 54 | +|exit |Exit the terminal.| |
| 55 | +|alias <name> <command> |Create a shortcut for a command.| |
| 56 | +|unalias <name> |Remove an alias.| |
| 57 | +
|
| 58 | +--- |
| 59 | +
|
| 60 | +## **Project Structure** |
| 61 | +
|
| 62 | +```plaintext |
| 63 | +Python-Terminal/ |
| 64 | +│ |
| 65 | +├── main.py # Main script for the terminal interface |
| 66 | +├── file_system.py # Handles file system and alias logic |
| 67 | +├── virtual_fs/ # Virtual file system root directory |
| 68 | +└── README.md # Documentation (this file) |
| 69 | +``` |
| 70 | +--- |
| 71 | + |
| 72 | +## **Contributing** |
| 73 | + |
| 74 | +Contributions are welcome! If you have suggestions for improvements or new features, feel free to: |
| 75 | + |
| 76 | +1. Fork the repository. |
| 77 | +2. Create a new branch. |
| 78 | +3. Submit a pull request. |
| 79 | + |
| 80 | +--- |
| 81 | + |
| 82 | +## **License** |
| 83 | + |
| 84 | +This project is licensed under the MIT License. See the LICENSE file for details. |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
0 commit comments