Ctrl + Shift + h – Visual list of history in iTerm2
Iterate through all files in a directory and split the names to be used also as directory name
Perform a find and replace on multiple files at once using find and perl
Kill multiple processes at the same time using ps and grep
or add this to your .bash_aliases file to use it more conveniently
Constrain Grep Line Output
Grep and return X (40 in this case) characters before and after result per line This helps to avoid having grep results that return extremely long lines which makes it difficult to parse the output.
Save a file using sudo when you currently do not currently have permissions