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
TipOfBash retweeted
:s/\(.*\) \(.*\)/\2 \1/g
swap your first name with your last name in Vim - limitless possibilities :)
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
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"
“@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>

