ls | List what's in the current directory. |
pwd | Prints the "present working directory," or the path to where you are in the filesystem |
cd ~ | Go to your home directory |
cd somewhere | Go to somewhere |
cd .. | Go to the parent directory |
open file.txt | Opens file.txt with its default program |
cat file.txt | Prints out the contents of file.txt |
python fun.py | Runs the Python program fun.py |
mv old.txt new.txt | Renames a file from old.txt to new.txt . Also works for directories. |
mv file.txt dir | Moves a file to directory dir . |
cp old.txt new.txt | Copy a file from old.txt to new.txt . |
mkdir bag | Creates a new directory called bag |
rm file.txt | removes (deletes) the file file.txt |
rm -d dir | removes (deletes) the directory dir |
rm -r dir | recursively removes (deletes) the directory dir and all subdirectories and files within that directory. Be careful, this is a powerful tool! |