find . ! -name '[NAME]' -type d -exec rm -rf {} +
Move files, including dot (hidden) files
$ shopt -s dotglob
$ mv [SRC]/* [DESTINATION]/
Source: command line - How can I get mv (or the * wildcard) to move hidden files? - Ask Ubuntu
$ [SOME_COMMAND]
$ echo $?
$ tail -n [NUM_LINES_PLUS_ONE] ~/.zsh_history | head -n [NUM_LINES] > notes.sh
# get process id
$ sudo lsof -i :[PORT]
# kill process
$ kill -9 [PID]
$ mkdir [DIRECTORY] && cd $_
>>
Append to file
>
output to something other than stdout (replace file)
|
feed output into another process
||
or operator
&&
and operator
$ stat -f “%OLp” [FILE]
$ ps -A
$ grep -R ‘unity.cloud_userid’
$ tail -n [NUM_LINES] [SRC_FILE] > [DEST_FILE]
tar zxvf [FILE].tgz -C [DESTINATION]
stat [FILE]
unzip ‘[FILE_PREFIX]*.zip’
tail -f [FILE]
ls -al
cat [FILE] | pbcopy
pbpaste > [FILE]
find .
mkdir -p [DIRECTORY_WITH_SUBDIRECTORIES]
cd -
for file in *.gz; do gunzip $file; done
dig NS [domain]
$ dig [domain] [@_NAME_SERVER]