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

Use tee to process a pipe with two or more processes
Tee can be used to split a pipe into multiple streams for one or more process to work it. You can add more " >()" for even more fun.

Print lines in a text file with numbers in first column higher or equal than a value
A text file contains thousands of numbers. This command prints lines were the number is greater or equal than a specified value (134000000).

Add prefix onto filenames
Best to try first with -n flag, to preview

Simple MAC Changeing
The 00:11:22:33:44:55 is whatever you want your new MAC address to be. Sometimes sudo should be used in front if you need to.

echo something backwards
NAME rev - reverse lines of a file or files SYNOPSIS rev [file ...] DESCRIPTION The rev utility copies the specified files to the standard output, reversing the order of characters in every line. If no files are specified, the standard input is read. AVAILABILITY The rev command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.

Quickest way to sort/display # of occurences

Query Wikipedia via console over DNS

Rename files in batch

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

list unique file extensions recursively for a path, include extension frequency stats
Get the longest match of file extension (Ex. For 'foo.tar.gz', you get '.tar.gz' instead of '.gz')


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: