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

Quick HTML image gallery from folder contents with Perl
This includes a title attribute so you can see the file name by hovering over an image. Also will hoover up any image format - jpg, gif and png.

Sort file greater than a specified size in human readeable format including their path and typed by color, running from current directory
1. find file greater than 10 MB 2. direct it to xargs 3. xargs pass them as argument to ls

list offsets from HEAD with git log.

Remove multiple same rpm packages
If somehow if you get more than 1 same name rpm package install, then it cannot be removed by using simple rpm -e as it gives you more than one rpm matches error. The --matches will help to remove all the same name rpm packages.

Burn a directory of mp3s to an audio cd.
This uses mpg123 to convert the files to wav before burning, but you can use mplayer or mencoder or ffmpeg or lame with the --decode option, or whatever you like.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Get the IP address
gives u each configured IP in a seperate line.

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

Copy a directory recursively without data/files

View webcam output using GStreamer pipeline
Open a window that displays camera capture. Framerate, width and height may be changed to match your needs.


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: