List Files

List the files in a directory with ls

ls

Or

ls path/to/dir

Change Directory

Change the directory you’re in with cd

cd other_directory
cd path/to/directory

Or go back up one level with ..

cd ..

Remove Files

Basic use of rm:

rm file.txt

To force delete of something that is write-protected:

rm -f file.txt

To recursively delete all files/subdirectories, use the -r option

# assume my_directory has multiple files in it
rm -r my_directory