Handy Shortcuts
OSX
Ctrl + Shift + h – Visual list of history in iTerm2
Linux
Command Line
Iterate through all files in a directory and split the names to be used also as directory name
1
|
|
Perform a find and replace on multiple files at once using find and perl
1
|
|
Kill multiple processes at the same time using ps and grep
1
|
|
or add this to your .bash_aliases file to use it more conveniently
1
|
|
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.
1
|
|
VI
Save a file using sudo when you currently do not currently have permissions
1
|
|