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

Shows what processes need to be restarted after system upgrade
This command can be installed in debian by the package debian-goodies. It also outputs the /etc/init.d/ commands that you need to do.

list block devices
Shows all block devices in a tree with descruptions of what they are.

Awesomeness Confirmation Bias

Mac OS X - List all of my machine's IP addresses
On the Mac, the format ifconfig puts out is little different from Linux: the IP address is space separated, instead of colon. That makes parsing the IP address easier. See releated command for Linux/Unix: http://www.commandlinefu.com/commands/view/651/getting-the-ip-address-of-eth0

Show linux kernel modules dependencies
Use modprobe to list all the dependencies of a certain kernel module. Handy when debugging system issues.

Sync the existing directory structure to destination, without transferring any files

Show every subdirectory (zsh)

Find the process you are looking for minus the grepped one
preferred way to query ps for a specific process name (not supported with all flavors of ps, but will work on just about any linux afaik)

Stat each file in a directory
Possible simplification of egrep-awk-sort with find and -exec with xargs.

Calculate pi to an arbitrary number of decimal places
Change the scale to adjust number of decimal places prefix the command with "time" to benchmark the computer (compare how long it takes to calculate 10000 digits of pi on various computers).


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: