Locations in home

$HOME/binLocal binaries
$HOME/etcSystem configuration for local binaries
$HOME/gamesLocal game binaries
$HOME/includeLocal C header files
$HOME/libLocal libraries
$HOME/lib64Local 64-bit libraries
$HOME/manLocal online manuals
$HOME/sbinLocal system binaries
$HOME/shareLocal architecture-independent hierarchy
$HOME/srcLocal source code

Primitives

lsList files in the directory
cdChange directory
rmRemove file or directory(-r)
cpCopy file or directory(-r)
mvMove file or directory
wcCount words in file
manRead the manual
catReads content of files sequentially
mkdirMake new directory
dateShow system date
grepSearches text for matches of a regular expression
tailDisplays the tail end of a file or data

Copy a file

$ cp readme.txt documents/

Duplicate a file

$ cp readme.txt readme.bak.txt

Copy a directory

$ cp -a myMusic myMedia/

Duplicate a directory

$ cp -a myMusic/ myMedia/

Move a file

$ mv readme.txt documents/

Move a directory

$ mv myMedia myMusic/

Rename a directory

$ mv myMedia/ myMusic/

Merge directories

$ rsync -a /images/ /images2/

Create a new file

$ touch 'new file'

Create a new directory

$ mkdir 'untitled folder'

Show file/directory size

$ du -sh node_modules/

Show file/directory info

$ stat readme.md

Open a file with the default program

$ xdg-open file   # on Linux

Zip a directory

$ zip -r archive_name.zip folder_to_compress

Unzip a directory

$ unzip archive_name.zip

Peek files in a zip file

$ unzip -l archive_name.zip

Remove a file

$ rm my_useless_file
$ rm -r my_useless_folder

List directory contents

$ ls my_folder        # Simple

Tree view a directory and its subdirectories

$ tree

Find a stale file

$ find my_folder -mtime +5

View content of a file

$ cat apps/settings.py

Search for a text

$ grep -i "Query" file.txt

Make applications in ~/bin/ available from anywhere

Edit ~/.bashrc, when finished run source ~/.bashrc.

export PATH=$PATH:$HOME/bin

Pipes

ls > fooSend output from ls into file foo
wc < fooReceive input from file foo into wc
ls | wcConnect output of ls into input of wc

Options

-aAll, Append-nNumber
-bBuffer, Batch-oOutput
-cCommand, Check-pPort
-dDebug, Delete, Directory-qQuiet, Quit
-eExecute, Edit-rRecurse
-fFile, Force-sSilent
-gGroup-tTag
-hHeaders, Help-uUser
-iInteractive-vVerbose, Version
-j-wWidth
-kKeep-xExtract
-lList-yYes
-mMessage-z