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

remove hostname from known_hosts

ThePirateBay.org torrent search
usage: tpb searchterm example: tpb the matrix trilogy This searches for torrents from thepiratebay and displays the top results in reverse order, so the 1st result is at the bottom instead of the top -- which is better for command line users

Ping all hosts on 192.168.1.0/24
Will report back IP address's of all hosts that are UP.

ps -ef | grep PROCESS | grep -v grep | awk '{print $2}' | xargs kill -9
kills all pids matching the search term of "PROCESS". Be careful what you wish for :)

generate random mac address

Count all files in directories recursively with find
Counts the files present in the different directories recursively. One only has to change maxdepth to have further insight in the directory hierarchy. Found at unix.stackexchange.com: http://unix.stackexchange.com/questions/4105/how-do-i-count-all-the-files-recursively-through-directories

apt-get upgrade with bandwidth limit
Trickle is here: http://monkey.org/~marius/pages/?page=trickle Trickle is a simple bandwidth limiter

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"

find both total size and number of files below any given svn directory
afaik, svn doesn't have a good, scriptable way of telling you these two basic pieces of information.

Tells the shell you are using


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: