Navigating the file system
List files in the current directory
lsList filenames only one per line (numerical value 1)
ls -1Long listing (l) of all files (a) with human readable sizes (h)
ls -lahList directory not the files within
ls -d <dir>Reverse sort order
ls -rRecursively list subdirectories
ls -RUseful sort order flags
Modified time
-tLast accessed time
-uCreation time
-UFile size
-S
Change directory
cd <dir>Go to home directory
cd ~Go to system root directory
cd /Return to last directory
cd -Show the path of the current directory location (print working directory)
pwdTree
Display files and sub directories graphically
treeIgnore (or include) specific files and directories
tree -I <path>
tree -P <path>Limit output to set folder depth (eg. 2 levels -L 2)
tree -L <depth>Other useful options
-aAll files (including hidden)-dList directories only-fPrint full paths-iDo not indent output-hPrint human readable size-sPrint size in raw bytes-CColourize output
Last updated