VimTip retweeted
search case insensitive in all the files recursively for the text "bash" and list the number of occurrences in each file
grep -ric bash *
VimTip retweeted
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
VimTip retweeted
ls -ltr $PWD/*
List file names in the current directory with full path
:s/\(.*\) \(.*\)/\2 \1/g
swap your first name with your last name in Vim - limitless possibilities :)
VimTip retweeted
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
VimTip retweeted
One advantage of visually dull environments like the command line or an editor is that there isn't much to do there but work.
VimTip retweeted
“@TipOfBash: Unlock another user's session from root :
loginctl list-sessions
loginctl unlock-session <session_id>”
VimTip retweeted
"cp filename{,.back}" : Take backup of the file easily. The command expands to "cp filename filename.back"
Open a list of files that were output of a previous command. For e.g. "find"
tinyurl.com/ac2n2mw


