Shell
A interactive shell that lets you run pras commands directly by name. and also allow you to run most of common shell commands.
To start the shell, run the following command
pras shell
Available Commands
PRAS Commands
- django - Set up a new Django project with all configurations in a single command
- netfetch - Scan the network to retrieve information on connected devices or locate a specific device
OS Commands
- cd - Change the current working directory & display the current directory
- clear - Clear the terminal screen
- cp - Copy files or directories to another location
- echo - Display a string or variables in the shell
- exit - Exit the current shell session
- help - Display information about shell commands
- ls - List files and directories in the current directory
- mkdir - Create a new directory
- mv - Move or rename files and directories
- rm - Delete files or directories
- touch - Create an empty file or update a file’s timestamp
- cat - Concatenate and display file contents
OS Commands Reference
cd
Use the cd command to change the current working directory to a specified path. Provide the path to the directory you want to switch to, as shown in the example below.
cd [path]
To display the current directory after changing directories, use the -s flag with the cd command, as demonstrated below.
cd -s
clear
Use the clear command to clear the terminal screen.
help
Use the help command to display information about shell commands.
ls
Use the ls command to list files and directories in the current directory.
ls
To list files and directories in a specific directory, provide the path to that directory, as shown below.
Supported Path Options:
- .. - Move up one level from the current directory
- . - Current directory
- / - Root directory
- Absolute path - Full path from the root directory
ls [path]
cp
Use the cp command to copy files or directories from one location to another. Specify the [source] path for the file or directory you want to copy and the [destination] path where you want it placed. See the example below for usage.
cp [source] [destination]
echo
Use the echo command to display text or variables on the terminal. Provide the text or variable you wish to display, as shown in the example below.
echo [text]
exit
Use the exit command to terminate the current shell session. This will close the interactive session of pras shell and return you to the main command prompt.
mkdir
Use the mkdir command to create a new directory. Specify the name or path of the directory you want to create, as shown in the example below.
mkdir [name]
mv
Use the mv command to move or rename files and directories. Provide the [source] path of the file or directory to move or rename, and the [destination] path where you want it to be located, as shown below.
mv [source] [destination]
rm
Use the rm command to delete files or directories. Provide the [path] of the file or directory you wish to remove, as shown in the example below.
rm [path]
To delete a directory and its contents (when the directory is not empty), use the -r (recursive) flag with the rm command, as demonstrated below.
rm -r [directory_path]
touch
Use the touch command to create a new empty file. Provide the name or path of the file you want to create, as shown in the example below.
touch [filename]
cat
Use the cat command to display the contents of a file. Provide the name or path of the file you want to display, as shown in the example below.
cat [path]