What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.

If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.

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:



May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!

Top Tags





Commands by hendry from sorted by
Terminal - Commands by hendry - 10 results
find . -name '*.mp3' | sort | while read -r mp3; do echo -e "<h3>$mp3</h3>\n<audio controls src=\"$mp3\"></audio>"; done > index.html; python -m http.server
2014-03-24 15:01:49
User: hendry
Functions: echo find python read sort
Tags: audio browser

I tried a few curses based mp3 players for playing back choir practice songs for my wife.

Unfortunately none of the ones I tried were capable of scrubbing a track.

Firefox saves the day.

mplayer -af volume=10.1:0 $movie
2013-05-11 20:47:50
User: hendry

If a movie is too hard to hear, try the above command to make it louder.

inotifywait -m -r .
find -iname '*.jpg' -print0 | xargs -0 feh -d
2011-04-10 15:28:14
User: hendry
Functions: find xargs
Tags: picture images

So you are in directory with loads of pictures laying around and you need to quickly scan through them all

2010-05-08 10:03:24
User: hendry

See the cols and lines and make sure the console it correctly configured for the screen size.

cat 1.tar.gz 2.tar.gz > 3.tar.gz; tar zxvfi 3.tar.gz
vim suite.js -c '%s!/\*\_.\{-}\*/!!g'
fromdos *
2010-03-18 16:51:58
User: hendry

The old dos2unix from sysutils has been deprecated on Debian systems to this tool.

HandBrakeCLI -i video.avi -o video.mp4
tar --exclude-vcs -cf src.tar src/