All commands (14,187)

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.

Share Your Commands


Check These Out

Verify if user account exists in Linux / Unix

find read write traffic on disk since startup
The iostat command is used for monitoring system input/output device loading by observing the time the devices are active in relation to their average transfer rates. in ubuntu to get the iostat program do this: sudo apt-get install sysstat i found this command here: http://www.ocztechnologyforum.com/forum/showthread.php?t=54379

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

rsync + find
rsync from source to dest all between >30

Get a list of all your VirtualBox virtual machines by name and UUID from the shell
A similar command that lists only the currently running VMs is thus: $ VBoxManage list runningvms ...the above showing a list of VMs by name and UUID in the same format as the "$ VBoxManage list vms" command

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

print a file on a single line
Example: you have a package.txt you want to install on a system. Instead of this: cat package.txt package1 package2 package3 You want it to cat out on one line so you can print "yum install package1 package2 package3"

Are the two lines anagrams?
This is just a slight alternative that wraps all of #7917 in a function that can be executed

Search manpages for a keyword
Search manpages for a keyword. Very useful when you don't know where to find the information.

get the top 10 longest filenames


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: