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

Keep from having to adjust your volume constantly
Run this in the directory you store your music in. mp3gain and vorbisgain applies the ReplayGain normalization routine to mp3 and ogg files (respectively) in a reversible way. ReplayGain uses psychoacoustic analysis to make all files sound about the same loudness, so you don't get knocked out of your chair by loud songs after cranking up the volume on quieter ones.

Watch the progress of 'dd'
need pv (pipe view) : http://www.ivarch.com/programs/pv.shtml

Execute a command, convert output to .png file, upload file to imgur.com, then returning the address of the .png.
My key is the anonymous one, is good for 50 post an hour with a maximun number of uploads a day, probably will run out, if that happend you can get a free key at the site.

Bash scripts encryption and passphrase-protection
This function will encrypt a bash script and will only execute it after providing the passphrase. Requires mcrypt to be installed on the system.

Watch the progress of 'dd'
Only slightly different than previous commands. The benefit is that your "watch" should die when the dd command has completed. (Of course this would depend on /proc being available)

Creates Solaris alternate boot environment on another zpool.
PS: 'lustatus' gives the list of all alternate boot environments.

check open ports without netstat or lsof

Reuse all parameter of the previous command line
!* is all of the arguments to the previous command rather than just the last one. This is useful in many situations. Here's a simple example: $ vi cd /stuff oops! [exit vi, twice] $ !* expands to: cd /stuff

convert a line to a space

Download entire commandlinefu archive to single file
'jot' does not come with most *nix distros, so we need to use seq to make it work. This version tested good on Fedora 11.


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: