Command line
General tricksâ
Go to last directoryâ
This will change to the last directory you were in.
cd -
Historyâ
Use Ctrl-r to search through your command history.
Clipboardâ
Copying to the clipboardâ
This will copy the contents of file.txt to your clipboard.
cat file.txt | pbcopy
Pasting from the clipboardâ
This will paste the contents of your clipboard into the file file.txt.
pbpaste > file.txt