The basic strcuture of dd command for our purpose is like this:
dd if=<file> of=<device> bs=4M; sync; eject <device>
➜ ~ lsblk
➜ ~ sudo dd if=/home/<user>/Downloads/linux_distro.iso of=/dev/sda bs=4M; sync; sudo eject /dev/sda
➜ ~
# Move into a repo just cloned
alias cdg='cd "$(basename "$_" .git)"'
# Git add, commit and push (uses function variables on the cli)
alias gacp='f(){ git add . && git commit -m "$1" && git push origin $2; unset -f f; }; f'
A good trick is doing multiple piped greps eg. history | grep "cool" | grep "event" | grep "narrower again"
➜ ~ grep "text to search" file.txt
➜ ~ grep -w "text to search" file.txt (Whole words)
➜ ~ grep -i (Case sensitive - not sensitive by default)
➜ ~ grep -n (Show line number)
➜ ~ grep -B n (See n lines before) -A n (See n lines after) -C n (See n lines around before and after)
➜ ~ grep -r "searching text" ./ (Recursive search)
➜ ~ grep -c (Return only the file names + number of matches in each file)
➜ ~ grep -P (To use Perl compatible regex such as "\d{4}")
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~
$ ~ kill -9 $(ps -e | grep searchterm | awk '{print $1}')