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

Output entire line once per unique value of the first column
Removes duplicates in the specified field/column while outputting entire lines. An elegant command for processing tab (or otherwise) delimited data.

Find the package that installed a command

List hostnames of all IPs

Show all programs on UDP and TCP ports with timer information
-p PID and name of the program -u on a UDP port. -t also TCP ports -o networking timer -n numeric IP addresses (don't resolve them) -a all sockets

clear MyDNS-ng cache
Occasionally, to force zone updating, cache flush is necessary. This command is better than restart the mydns daemon.

extracts 64 bytes of random digits from random lines out of /dev/random sent to stdio
Use this the next time you need to come up with a reasonably random bitstring, like for a WPA/WPA2 PSK or something. Takes a continuous stream of bytes coming from /dev/urandom, runs it through od(1), picking a random field ($0 and $1 excluded) from a random line and then prints it.

List files above a given threshold
List files above a given size threshold.

uniq for unsorted data

Minimize Apps When Middle Clicking on Titlebar
Middle click on titlebar to minimize apps

Perform a reverse DNS lookup
Performs a reverse DNS lookup, variants include: $ nslookup 74.125.45.100 or: $ host 74.125.45.100


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: