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

Take screenshots with imagemagick
Now try this. Ones you see small cross arrow, double click on any window you like to make a screenshot "selectively".

check open ports without netstat or lsof

Converting video file (.flv, .avi etc.) to .3gp
ffmpeg -i = input file name -s = set frame size, qcif=176x144 -vcodec = force video codec -r = frame-rate [default = 25] -b = bit-rate [200 kb/s] -acodec = force audio codec -ab = audio bitrate in bits/s [64k] -ac = no. of audio channels [1] -ar = audio sampling frequency [44100 Hz] optional: -sameq = use same video quality as source (implies VBR) -f = force format -y = overwrite output files

Command for JOHN CONS
Would create a file with a meaningful title. Dedicated to John Cons, who is annoying us users. Merry Christmas!!!

split source code to page with numbers

Compare a remote file with a local file
A little messy, but functional. Requires vim >= 7.x.

Sort output by column
(separator = $IFS)

Remove a line from a file using sed (useful for updating known SSH server keys when they change)
For example, to remove line 5 from foo, type: vi +5d +wq foo

Ultimate current directory usage command
Based on the MrMerry one, just add some visuals and sort directory and files

convert filenames in current directory to lowercase
The simplest way I know.


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: