VimTip (@VimTip) profile picture
Joined February 2012
search case insensitive in all the files recursively for the text "bash" and list the number of occurrences in each file grep -ric bash *
perform operation on all the csv files in the current directory $ for i in `ls *.csv` ; do echo $i; done do what you like instead of echo
ls -ltr $PWD/* List file names in the current directory with full path
mkdir -p /a/b/c/d : creates the entire directory structure with folders a, b, c, d
rm -f file[12345].txt : removes file1.txt, file2.txt, file3.txt, file4.txt, file5.txt Try the -i switch if you are feeling merciful
!13 : Execute the 13th command from bash history.
One advantage of visually dull environments like the command line or an editor is that there isn't much to do there but work.
6
62
16
“@TipOfBash: Unlock another user's session from root : loginctl list-sessions loginctl unlock-session <session_id>”
"cp filename{,.back}" : Take backup of the file easily. The command expands to "cp filename filename.back"
top -M : see stats in MB/GB format.
g; will cycle through your recent changes (or g, to go in reverse. is.gd/4xZW
16
25
CTRL-w s CTRL-w T will open current buffer in new tab (via @vrybas_)
1
13
26