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

Select rectangular screen area
Hold 'Ctrl' + 'Alt' key while selecting rectangular text area of the screen with left mouse button. Should work in any terminal screen (xterm, konsole, ...) under X, if not then try with 'Ctrl' + 'Shift' + 'Alt' or two-combination of these.

mplayer -af scaletempo
Pitch-correct play speed with mplayer. You can also use [] and {} keys to change play speed on-the-fly.

list files recursively by size

Throttle download speed (at speed x )
Axel --max-speed=x, -s x You can specify a speed (bytes per second) here and Axel will try to keep the average speed around this speed. Useful if you don?t want the program to suck up all of your bandwidth.

Recursively search for large files. Show size and location.

Produce 10 copies of the same string

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

Display all shell functions set in the current shell environment
Uses the shell builtin `declare` with the '-f' flag to output only functions to grep out only the function names. You can use it as an alias or function like so: alias shfunctions="builtin declare -f | command grep --color=never -E '^[a-zA-Z_]+\ \(\)'" shfunctions () { builtin declare -f | command grep --color=never -E '^[a-zA-Z_]+\ \(\)'; }

seq can produce the same thing as Perl's ... operator.
Optionally, one can use {1..50} instead of seq. E.g. for i in {1..50} ; do echo Iteration $i ; done

Monitor a file's size
use "watch" instead of while-loops in these simple cases


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: