TipOfBash (@TipOfBash) profile picture
Joined June 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
TipOfBash retweeted
CTRL + o : go to previous location in vim CTRL + i : go to next location in vim
2
3
ls -ltr $PWD/* List file names in the current directory with full path
TipOfBash retweeted
:ls list all the buffers
TipOfBash retweeted
:wn Save the current buffer and move to the next
TipOfBash retweeted
:s/\(.*\) \(.*\)/\2 \1/g swap your first name with your last name in Vim - limitless possibilities :)
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.
If you are not using groovy for scripting, you are missing out on something
If you are on sqlplus prompt and need to run ls,you can do sql> host ls -ltr generically, any os command can be run with host as a prefix
A weird imagination is most useful to gain full advantage of all the features - From the "screen" man pages.
query information about a package using rpm "rpm -q package_name". Uninstall a package "rpm -e package_name"
find the version of fedora you are running "cat /proc/version"
1
1
“@TipOfBash: Unlock another user's session from root : loginctl list-sessions loginctl unlock-session <session_id>”
Unlock another user's session from root : loginctl list-sessions loginctl unlock-session <session_id>
TipOfBash retweeted
“Why can’t I quit you?!” –someone using vim for the first time
30
558
246
Thoughts on today’s Nokia announcement pocket.co/ss279
grep -vl foo * List all files which do not contain foo