pwd |
Displays the path of the current working directory |
cd <PATH> |
Changes the current working directory to <PATH> |
cd ~ |
Changes the current working directory to the user’s home directory |
cd .. |
Moves up one folder |
cd ../.. |
Moves up two folders |
clear |
Clears the contents of your command line window |
ls |
Lists files and folders in the current working directory |
ls <PATH> |
Lists files and folders in <PATH> |
ls -a |
Lists all files (including hidden files) in the current working directory |
ls -alh |
Lists all files in a long format that is easy to read for humans |
[Command] --help |
Displays all possible flags for a specific command (on Windows) |
man [Command] |
Displays all possible flags for a specific command (on macOS) |
mkdir <FOLDER> |
Creates a new folder called <FOLDER> |
mkdir <FOLDER1> <FOLDER2> |
Creates two separate folders called <FOLDER1> and <FOLDER2> |
touch <FILE> |
Creates a new empty file called <FILE> |
open <FILE> |
Opens the file called <FILE> (on macOS) |
start <FILE> |
Opens the file called <FILE> (on Windows) |
echo "example text" >> file.txt |
Writes “example text” into file.txt |
cat <FILE> |
Displays the content of <FILE> |
mv FILE.txt <FOLDER> |
Move FILE.txt into <FOLDER> |
mv <FOLDER_OLD> <FOLDER_NEW> |
Renames <FOLDER_OLD> to <FOLDER_NEW> |
ls -alh *.csv |
Uses a wildcard to list all .csv files in the current working directory |
rm -r <FOLDER> |
Removes the folder <FOLDER> |
history |
Display the command history of the current terminal session |
history > history.txt |
Saves the entire command history to a file named history.txt (overwrites existing content in history.txt ) |
history >> history.txt |
Adds the entire command history to the end of the file named history.txt |
tree |
Displays a graphical representation of the directory structure |
wget <URL> |
Downloads a file from the specified to the current directory |