### Commands by leosimon (2) the last day the last week the last month all time sorted by date votes

• Only to logout all users except root

1
who -u | grep -vE "^root " | kill awk '{print $6}' · 2010-11-13 16:51:09 • It's only to logout all other user's except "root" 1 who -u|grep -v root|awk {'print$6'}|kill awk {'print $0'} · 2010-11-05 12:19:06 ### What's this? commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down. ### Check These Out a simple bash one-liner to create php file and call php function Find passwords that has been stored as plain text in NetworkManager Flush and then immediately start watching a file This is useful for keeping an eye on an error log while developing. The !^ pulls the first arg from the previous command (which needs to be run in a sub-shell for this shortcut to work). scp file from hostb to hostc while logged into hosta While at the command line of of hosta, scp a file from remote hostb to remote hostc. This saves the step of logging into hostb and then issuing the scp command to hostc. Coping files, excluding certain files Preserve file structure when coping and exclude some file o dir patterns escape any command aliases e.g. if rm is aliased for 'rm -i', you can escape the alias by prepending a backslash: rm [file] # WILL prompt for confirmation per the alias \rm [file] # will NOT prompt for confirmation per the default behavior of the command Dump the root directory to an external hard drive This will compress the root directory to an external hard drive and split it to parts once it reaches the 4 Gigs file system limit. You can simply restore it with:$ restore ivf /media/My\ Passport/Fedora10bckup/root_dump_fedora

Change your swappiness Ratio under linux
This command allow you to set the swappiness var at 50 (default is 60). The value interval must be set between 0 and 100. If swappiness is high=Swap usage is high, if swappiness is low=Ram usage is high.

Get the Volume labels all bitlocker volumes had before being encrypted
Get information of volume labels of bitlocker volumes, even if they are encrypted and locked (no access to filesystem, no password provided). Note that the volume labels can have spaces, but only if you name then before encryption. Renaming a bitlocker partition after being encrypted does not have the same effect as doing it before.

Use a regex as a field separator awk