Edit the files, each in a separate tab. use gT and gt to move to the left- and right-tab, respectively. to add another tab while editing, type ':tabe filename'
This command will list a CSV list of infected files detected by clamav through squidclamav redirector.
Parses tektronic given csv files for both channel 1 and channel 2 and joins them together. Can be easily used by gnuplot after that.
Replace 'more' command with any command which is in your PATH. Show Sample Output
It's pretty common to forgot to commit a files, be it a modification, or a brand new file. If you did forget something, git add the files you want, and then git commit --amend. It will essentially redo the last commit, with the changes you just added. It seeds the commit message with the last commit message by default. You probably shouldn't do this if you've already pushed the commit. Show Sample Output
Force empties the user trash
This command handles git rm'ing files that you've deleted. Show Sample Output
Show only the subdirectories in the current directory. In the example above, /lib has 135 files and directories. With this command, the 9 dirs jump out. Show Sample Output
Sort a list of IPV4 addresses in numerical order. Great as a filter, or within vim using !} Show Sample Output
Often, when sorting you want the sort to ignore extraneous characters. The b, d, and f tell sort to ignore leading blanks, use 'dictionary order' (ignore punctuation), and ignore (fold) case. Add a "u" if you only want one copy of duplicate lines. This is a great command to use within vim to sort lines of text, using !}sort -bdf Show Sample Output
Finds the string in every file in an entire directory and all its subdirectories and replaces it with a new string. Especially useful when changing a machine's IP address or hostname - run it on /etc.
Old snapshots can cause problems. It's best to remove them when finished. I use this script to remove all snapshots. The "while read" command is necessary because my vm names contain spaces. The "time" command reports how long the process runs.
I use this command on my machines running VMware Server to print out the state of all registered Virtual machines. Show Sample Output
rpm, sometimes, is not wildcard friendly. To search files installed from package this could be useful. change PACKAGENAME to any package do you want to search Show Sample Output
Create a persistent SSH connection to the host in the background. Combine this with settings in your ~/.ssh/config: Host host ControlPath ~/.ssh/master-%r@%h:%p ControlMaster no All the SSH connections to the machine will then go through the persisten SSH socket. This is very useful if you are using SSH to synchronize files (using rsync/sftp/cvs/svn) on a regular basis because it won't create a new socket each time to open an ssh connection.
Run this in / in a chroot to get your own proc there.
Might match "ping 192.168.0.1" and then run it.
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.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: