Hide

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.


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.
Hide

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:

Hide

News

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!
Hide

Top Tags

Hide

Functions

Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

Leave a comment when voting down..

Terminal - Leave a comment when voting down..
if [ "${vote}" = "down" ]; then echo leave comment; fi
2009-03-20 00:31:13
Functions: echo
-10
Leave a comment when voting down..

I think it would be wise if anyone voting down left a comment indicating the reason for that action. Don't keep it to yourself. Thanks.

Alternatives

There are 3 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

Let me be the first to vote it down then.

1) This site is not for political step stools for your opinions.

2) This site is built as a repository of those golden commands that only the gurus know, but are willing to share.

3) Your command is not syntactically correct. You forgot your semicolon.

4) Backticks suck. $() is the way of the Jedi.

5) Leave isn't installed on my system.

Comment by atoponce 388 weeks and 2 days ago

Focus your energies on getting the site developers to implement tags,categories, intended audience, etc and this thing could explode (Rails, VI, IOS, EMACS, Shell, SQL, jquery, etc, etc)

Comment by vaporub 388 weeks and 2 days ago

Good call, koukos (shame about the syntax :-)

Fortunately, most of the people likely to vote down will have read your comment.

Comment by flatcap 388 weeks and 2 days ago

Syntax errors! :-)

Need a space after the "[", before the "]",

and a ";" after the "]".

Also, it's better to place variables in ${} and quotes.

The ${vote} should be quoted "${vote}" in case it is NULL (or an empty string).

Use $() instead of `` because backticks are hard to read while $() can be nested (if needed).

However, the `leave comment` here is an error

because it would be replaced by the result of executing "leave command" which was probably not intended.

if [ "${vote}" = "down" ]; then echo leave comment; fi

I agree it may be instructive if people leave comments but I also think it is better that they are free not to leave comments if they do not wish to.

if [ "${vote}" = "down" ]; then echo leave downer comment; else echo leave jolly rantings; fi

Comment by mpb 388 weeks and 2 days ago

hahaha, I think writing the command wrong did the trick :P

I don't think I'm forcing anyone to write comments, I think I was polite enough and tried to move them to do so.

Comment by JesusSuperstar 388 weeks and 2 days ago

atoponce: Thanks to you, I wish there was an option to vote comments up.

Comment by cards 388 weeks and 1 day ago

2016-1-25 xiaozhengm

http://www.coachfactory--outletonline.com

http://www.fitflopuk.me.uk

http://www.michaelkorsoutletoff.in.net

http://christianlouboutin.eshopping.us.com

http://www.oakleysunglassesfake.in.net

http://www.michaelkors-handbags.me.uk

http://www.guccioutlet.net.co

http://www.nikehuarache.com.co

http://www.ghdhairstraighteners.com.co

http://www.michaelkorshandbags.cc

http://tiffany.outletmalls.us.com

http://www.adidasgazelle.me.uk

http://oakley.adsmall.us.com

http://canadagoose.shopgioia.com

http://www.longchamphandbags.com.co

http://www.runningshoes.com.co

http://canadagoose.adsmall.us.com

http://www.louboutinshoes.cc

http://www.michaelkors-outletsale.com

http://truereligion.adsmall.us.com

http://www.gucci-borse.it

http://www.nikesb.uk

http://www.mcmhandbags.name

http://www.mizunorunningshoes.in.net

http://www.coachcanadaoutlet.ca

http://www.nikeblazers.me.uk

http://uggs.uggaustralia.qc.com

http://www.nike-blazerlow.fr

http://www.saclongchamp--pascher.fr

http://www.adidassuperstar.co.uk

http://www.nikerosheruns.me.uk

http://christianlouboutin.outletmalls.us.com

http://www.edhardy-outlet.name

http://www.soccer-jerseys.us.com

http://www.airmax95.org.uk

http://www.jordan13.org

http://www.nikeuk.me.uk

http://www.jordan6.net

http://nike.outletmalls.us.com

http://www.louisvuittonoutlets.name

http://www.outlet-toms.cc

http://ugg.shopgioia.com

http://www.nike-airmax90.me.uk

http://www.coachoutletonlinespick.org

http://jordan.outletmalls.us.com

http://www.katespadeuk.me.uk

http://www.adidasshoes.name

http://www.fitflops.in.net

http://www.mulberry-bags.org.uk

http://www.louis-vuittonhandbags.us

http://louboutin.adsmall.us.com

http://www.louboutin.org.uk

http://www.timberlanduk.me.uk

http://burberry.outletmalls.us.com

http://www.louisvuittonuk.me.uk

http://www.quality-outlet.com

http://www.mymichaelkorssoutlets.org

http://www.vipmichaelkors-outletonline.com

http://www.canadagooseoutlet.cc

http://www.chiflatiron.in.net

http://www.ugg-boots-store.com

http://www.louis-vuitton-outlet.us.com

http://rayban.adsmall.us.com

http://www.pradaoutlet.name

http://www.nikestoreuk.me.uk

http://www.cheapjordans.com.co

http://www.ralph-lauren-pas-cher.fr

http://www.nike-airmax.org.uk

http://www.coach-factory-outlet-online.us.com

http://www.adidas-trainers.me.uk

http://www.nike-tn-pascher.fr

http://www.canadagooseuk.me.uk

http://www.michaelkorsukbag.co.uk

http://www.poloralphlauren.net.co

http://www.basketballshoes.net.co

http://www.toms-outlet.cc

http://www.saclongchamp-solde.fr

http://www.michaelkorsoutletforus.com

http://www.cheapwholesaleuggboots.com

http://www.cheapjordansshoes.in.net

http://northface.outletmalls.us.com

http://www.mcmoutlet.us

http://abercrombie.shopgioia.com

http://www.snapbacks-wholesale.us

http://www.new-balanceoutlet.us

http://www.hermesbelt.in.net

http://www.longchampoutlet.net.co

http://www.ugg-boots-australia.com

http://www.toryburchoutlet-sale.in.net

http://www.hermesuk.org.uk

http://burberryoutlet.outletmalls.us.com

http://www.michaelkors-discount.com

http://www.top-coachoutletstore.org

http://www.coach-factoryoutlet.com.co

http://www.airjordan-uk.org.uk

http://www.michaelkors-handbag.me.uk

http://www.toms.in.net

http://www.airjordan-pascher.fr

http://www.niketrainers.com.co

http://www.authenticlouisvuittonhandbags.net

http://www.fitflops.us

http://www.adidasuk.org.uk

http://www.louisvuitton-borse.it

http://timberland.adsmall.us.com

http://www.truereligion-outlet.in.net

http://www.coach-factoryoutlet.cc

http://www.chaussure-louboutin.fr

http://canadagoose.outletmalls.us.com

http://ralphlauren.eshopping.us.com

http://www.nikecortez.com.co

http://www.michael-korshandbags.net.co

http://www.sac-longchamppliage.fr

http://www.michael-kors-handbags.uk

http://oakley.shopgioia.com

http://www.michael--korsoutlet.us.com

http://michaelkors.eshopping.us.com

http://www.instylermax.in.net

http://www.canadagoosejackets.org.uk

http://www.kate-spadeoutlet.us

http://www.louisvuitton-sac-pascher.fr

http://www.jordan3.net

http://christianlouboutin.shopgioia.com

http://www.nikefreeruns.uk

http://oakley.eshopping.us.com

http://ugg.outletmalls.us.com

http://www.kate-spadeoutlet.com.co

http://www.truereligion-outlet.net.co

http://coach.outletmalls.us.com

http://www.christianlouboutinsell.net

http://michaelkors.outletmalls.us.com

http://www.michaelkors-mkoutlet.in.net

http://www.marc-jacobs.in.net

http://www.chaussurelouboutin-pascher.fr

http://www.christianlouboutinoff.us

http://www.montblancpens.us.org

http://www.ghdstraighteners.me.uk

http://www.coachouletbtf.com

http://ugg.adsmall.us.com

http://coach.eshopping.us.com

http://www.airforce1-nike.fr

http://sunglasses.outletmalls.us.com

http://www.rolex-replicawatches.com.co

http://www.michaelkors-bags.me.uk

http://www.nikerosherunwomen.me.uk

http://www.fitflopssaleclearance.com

http://www.moncler-jackets.org

http://www.coachoutlet-storeonline.in.net

http://www.coachoutletstoreonlines.us

http://www.jordan4.net

http://burberry.eshopping.us.com

http://www.raybans.org.uk

http://www.ralphlaurenuk.me.uk

http://www.oakley--sunglasses.us.org

http://www.cheap-uggsonsale.in.net

http://www.monclerjacketsoutlet.us.com

http://ralphlauren.shopgioia.com

http://www.kate-spadeoutlet.in.net

http://www.gucci-outlet.org

http://www.raybansunglassesdeals.com.co

http://www.true-religionjeans.net.co

http://www.mk-michaelkorsoutletonline.com

http://www.pandoracharms.com.co

http://rayban.eshopping.us.com

http://www.coachoutlet-storeonline.us.com

http://www.jordan8.net

http://burberry.adsmall.us.com

http://www.cheap-tomsoutlet.us

http://www.ralph-lauren.me.uk

http://www.sunglass-outlet.us

http://www.polooutlet.us.com

http://coach.adsmall.us.com

http://rayban.shopgioia.com

http://louisvuitton.outletmalls.us.com

http://www.jordan-femmepascher.fr

http://www.montblanc-pens.name

http://www.juicy-couture.us

http://www.tomsshoes.us.com

http://michaelkors.adsmall.us.com

http://www.michaelkors-outlet-handbags.com

http://hollister.shopgioia.com

http://www.adidas-shoes.me.uk

http://ugg.eshopping.us.com

http://www.tomswedges.in.net

http://www.edhardyukclothing.me.uk

http://www.michaelkorsoutletvip.in.net

http://www.coachfactoryoutletus.in.net

http://www.michaelkors-outletonlines.in.net

http://www.christianlouboutinuk.me.uk

http://toms.adsmall.us.com

http://www.pandorajewelryoutlet.name

http://www.louisvuitton-outletstores.org

http://burberry.shopgioia.com

http://canadagoose.eshopping.us.com

http://www.coach-factoryoutlet.eu.com

http://www.michael-korsuk.me.uk

http://www.tomsoutletstore.in.net

http://www.raybansoutlet.in.net

http://www.truereligion-outlet.com

http://www.cheaplouisvuittonhandbags.org

http://www.guccioutlet.com.so

http://www.get-coachoutletonline.org

http://www.katespadeoutletsale.in.net

Comment by xiaozhengm 30 weeks and 6 days ago

Your point of view

You must be signed in to comment.