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

mkdir & cd into it as single command

Terminal - mkdir & cd into it as single command
mkdir /home/foo/doc/bar && cd $_
2011-08-12 11:29:19
User: kzh
Functions: cd mkdir
52
mkdir & cd into it as single command

The biggest advantage of this over the functions is that it is portable.

Alternatives

There are 7 alternatives - vote for the best!

Terminal - Alternatives
md () { mkdir -p "$@" && cd "$@"; }
2009-09-24 16:09:19
User: drewk
Functions: cd mkdir
30

How often do you make a directory (or series of directories) and then change into it to do whatever? 99% of the time that is what I do.

This BASH function 'md' will make the directory path then immediately change to the new directory. By using the 'mkdir -p' switch, the intermediate directories are created as well if they do not exist.

function mcd() { [ -n "$1" ] && mkdir -p "$@" && cd "$1"; }
2009-05-20 16:41:48
Functions: cd mkdir
4

I find that I create a directory and then cd into that directory quite often. I found this little function on the internets somewhere and thought I'd share it. Just copy-paste it into you ~/.bash_profile and then `source ~/.bash_profile`.

echo 'mkcd() { mkdir -p "$@" && cd "$_"; }' >> ~/.bashrc
2010-01-13 09:37:56
User: phaidros
Functions: cd echo mkdir
-3

combines mkdir and cd

added quotes around $_, thanx to flatcap!

mkgo newdir
2011-12-11 07:31:35
User: awoods
Tags: bash function
-11

# put this in your .bashrc

mkgo (){

mkdir $1 && cd $1

}

Know a better way?

If you can do better, submit your command here.

What others think

2016-1-26 xiaozhengm

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

http://www.fitflopuk.me.uk

http://www.michaelkorsukbag.co.uk

http://www.get-coachoutletonline.org

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

http://www.runningshoes.com.co

http://www.toms-outlet.cc

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

http://www.louboutinshoes.cc

http://canadagoose.outletmalls.us.com

http://www.nike-blazerlow.fr

http://uggs.uggaustralia.qc.com

http://www.nikestoreuk.me.uk

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

http://coach.outletmalls.us.com

http://www.adidasshoes.name

http://michaelkors.adsmall.us.com

http://www.hermesbelt.in.net

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

http://coach.eshopping.us.com

http://louisvuitton.outletmalls.us.com

http://www.hermesuk.org.uk

http://www.katespadeoutletsale.in.net

http://toms.adsmall.us.com

http://www.fitflopssaleclearance.com

http://michaelkors.eshopping.us.com

http://ugg.adsmall.us.com

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

http://www.canadagoosejackets.org.uk

http://ugg.eshopping.us.com

http://www.timberlanduk.me.uk

http://www.jordan13.org

http://christianlouboutin.outletmalls.us.com

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

http://www.instylermax.in.net

http://www.coachfactoryoutletus.in.net

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

http://tiffany.outletmalls.us.com

http://www.louboutin.org.uk

http://www.monclerjacketsoutlet.us.com

http://louboutin.adsmall.us.com

http://www.louisvuitton-borse.it

http://www.mcmhandbags.name

http://www.truereligion-outlet.com

http://www.new-balanceoutlet.us

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

http://www.outlet-toms.cc

http://canadagoose.shopgioia.com

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

http://www.top-coachoutletstore.org

http://www.edhardy-outlet.name

http://www.jordan6.net

http://www.longchamphandbags.com.co

http://www.chaussurelouboutin-pascher.fr

http://www.ghdstraighteners.me.uk

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

http://www.saclongchamp-solde.fr

http://www.coachcanadaoutlet.ca

http://burberryoutlet.outletmalls.us.com

http://sunglasses.outletmalls.us.com

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

http://www.nikefreeruns.uk

http://michaelkors.outletmalls.us.com

http://www.mk-michaelkorsoutletonline.com

http://www.cheaplouisvuittonhandbags.org

http://burberry.eshopping.us.com

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

http://www.airjordan-pascher.fr

http://www.ralphlaurenuk.me.uk

http://www.moncler-jackets.org

http://www.adidassuperstar.co.uk

http://abercrombie.shopgioia.com

http://www.authenticlouisvuittonhandbags.net

http://www.airforce1-nike.fr

http://www.coach-factoryoutlet.cc

http://www.coachoutletonlinespick.org

http://www.coachouletbtf.com

http://rayban.eshopping.us.com

http://www.ghdhairstraighteners.com.co

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

http://ralphlauren.shopgioia.com

http://rayban.adsmall.us.com

http://www.mcmoutlet.us

http://www.louisvuittonuk.me.uk

http://www.jordan-femmepascher.fr

http://www.toms.in.net

http://burberry.outletmalls.us.com

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

http://oakley.adsmall.us.com

http://www.basketballshoes.net.co

http://ugg.shopgioia.com

http://www.raybansoutlet.in.net

http://www.mizunorunningshoes.in.net

http://www.pandoracharms.com.co

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

http://www.michaelkorsoutletoff.in.net

http://www.tomswedges.in.net

http://ugg.outletmalls.us.com

http://www.cheapjordansshoes.in.net

http://www.mymichaelkorssoutlets.org

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

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

http://www.nikeblazers.me.uk

http://burberry.shopgioia.com

http://timberland.adsmall.us.com

http://coach.adsmall.us.com

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

http://www.nikesb.uk

http://www.nikerosherunwomen.me.uk

http://www.christianlouboutinuk.me.uk

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

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

http://www.michaelkors-discount.com

http://www.polooutlet.us.com

http://www.niketrainers.com.co

http://www.airmax95.org.uk

http://www.montblancpens.us.org

http://www.adidasuk.org.uk

http://www.poloralphlauren.net.co

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

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

http://www.jordan3.net

http://www.cheapwholesaleuggboots.com

http://hollister.shopgioia.com

http://www.michaelkorshandbags.cc

http://www.fitflops.in.net

http://www.snapbacks-wholesale.us

http://www.edhardyukclothing.me.uk

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

http://www.fitflops.us

http://www.raybans.org.uk

http://northface.outletmalls.us.com

http://nike.outletmalls.us.com

http://www.michaelkorsoutletforus.com

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

http://www.juicy-couture.us

http://www.raybansunglassesdeals.com.co

http://www.louis-vuittonhandbags.us

http://www.quality-outlet.com

http://christianlouboutin.eshopping.us.com

http://www.cheap-tomsoutlet.us

http://www.longchampoutlet.net.co

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

http://www.louisvuittonoutlets.name

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

http://www.tomsshoes.us.com

http://www.canadagooseoutlet.cc

http://canadagoose.adsmall.us.com

http://www.adidasgazelle.me.uk

http://christianlouboutin.shopgioia.com

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

http://www.pradaoutlet.name

http://www.guccioutlet.com.so

http://www.jordan4.net

http://canadagoose.eshopping.us.com

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

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

http://www.nikerosheruns.me.uk

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

http://oakley.shopgioia.com

http://www.sunglass-outlet.us

http://www.chiflatiron.in.net

http://www.tomsoutletstore.in.net

http://www.coachoutletstoreonlines.us

http://www.gucci-borse.it

http://www.jordan8.net

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

http://www.chaussure-louboutin.fr

http://www.michaelkors-outletsale.com

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

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

http://burberry.adsmall.us.com

http://www.montblanc-pens.name

http://www.sac-longchamppliage.fr

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

http://www.michaelkorsoutletvip.in.net

http://www.cheapjordans.com.co

http://www.louisvuitton-outletstores.org

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

http://www.pandorajewelryoutlet.name

http://www.christianlouboutinsell.net

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

http://rayban.shopgioia.com

http://www.oakleysunglassesfake.in.net

http://www.kate-spadeoutlet.us

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

http://www.gucci-outlet.org

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

http://ralphlauren.eshopping.us.com

http://oakley.eshopping.us.com

http://www.vipmichaelkors-outletonline.com

http://www.canadagooseuk.me.uk

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

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

http://truereligion.adsmall.us.com

http://jordan.outletmalls.us.com

http://www.guccioutlet.net.co

http://www.nikeuk.me.uk

http://www.katespadeuk.me.uk

http://www.christianlouboutinoff.us

http://www.nikecortez.com.co

http://www.nikehuarache.com.co

Comment by xiaozhengm 51 weeks and 1 day ago

Bags passion are certainly not specifically made pertaining to lovers or maybe it does not only signify into a caring several distinct bags, the truth is bags passion signify the bags which you'll have for anybody who you care and love in relation to. Bags of love because explained brand might be misinterpreted often however today dealing with this post would certainly allow you to get this within distinct along with specific sort. You can find many bags passion that contains different styles, assisting you to select the ones that have been perfect as per your preferences.Bags of affection with present marketBags passion are quite frequent using todays technology, because individuals have grow to be model cognizant and style conservative that has made them knowledgeable with the most recent tendencies adopted on the market. The majority of people use bags of love intended for presents along with presents on their family members. You'll be able to pick out bag passion with regard to nay age group people as it is not confined for a particular grow older. Bags of affection come in different types like some are youngsters certain, some are women created whilst several bags are made for old age ladies. Effectively there are some bags that happen to be exclusively made for guys.Styles in bags connected with loveThere are numerous designs seen in bags passion within market place between most costly kinds to the affordable bags. Some of the sorts are as follows: green moving bags which are generated for teenage girls. White bag load up duffels are generally another type with bags passion. Light red stylish handbags, luxury photo handbags and individualized photography handbags usually are several types seen in bags of love. You could find any kind of layout in bags of love yourself much like your current measurement, bodyweight (that you can cope with and carry).How to get bags of http://www.hermesbeltsbirkinkellybag.co.uk/ love?You can find bags for each other by way of a lot of paths based on anyone that which technique is best suited per the needs you have, price tag along with time access. There exists a handbook course and an on-line approach, both of them are entirely reputable. Bags passion can be bought via websites, you just have to carry out detailed net research after which select the best online shop supplying speediest companies. Online stores can provide you with Bags of love within just couple of days, Guidebook checking out of the outlets is usually better for anyone that happen to be more than conscious

Comment by stephanieg915 2 days ago

Your allure of' outfits could it be will be practical adequate for being exploited for virtually every type of form of special event, whether it be profession meeting upwards or even destined for any get together. Whether the clothes can be simple or even excellent and beautiful, just about every format highlights the amount in the sensible and cutting-edge strategy.Michael Kors wrist watches include a global ensure which can be legitimate for two main several years from your purchase date. You should simply secure the backup on the sales receipt for getting states when the observe fails throughout the promise period. The corporate states to make no cost maintenance and also substitutes for the duration of your ensure period. Overall when you have fetish with regard to enjoy your collection have to have 1.Versace take presctiption consistently in search of important, processed as well as innovative what to used in their particular designer watches in addition to valuable necklaces. Jewels as well as pieces picked by means of qualified gemmologist, greater technology ceramic, 17 karat rare metal, anti-scratch amethyst amazingly, particularly picked remarkable pure wash rag are simply just a variety of with the ingredients from the Versace product.The temperature might not be cooperating, but it IS planting season ( space ) the season to scrub out of the cabinets and re-think the clothing. The most effective way for you to freshen up your look is usually to buy a fantastic handbag, and this also time your choices are generally endless! The most notable styles within bags add the gleaming, your clean, the particular weaved as well as the clutch i465 black ( space ) consequently think comfy views along with choose from one of these manner frontward variations.Michael Kors handbags Upon SaleOur choice of fellas fragrances is made up of brand names including Lacoste, Electrical socket, Azzaro, Hanae Mori and gray Flanner for Men, to help you conveniently locate only the perfect aroma with the special gentleman in your own life.The similar skilled tradesmen that hands art this Handbags furthermore put the same artistry into creating the sneakers. Each and every shoe you might feel that identical distinctive ease and comfort allowing the feet to be able to air and grow comfortable each day. Try out carrying out in which in most some other shoes or boots and you'll be let down. Not all shoes allow you to use them throughout the day along with nighttime.Michael Kors presents the http://www.hermesbeltsbirkinkellybag.co.uk/ most recent variety of innovative and fashionable natural leather handbags you can have on on any occasion. The particular Astor girls custom leather-based handbag variety attributes basic types, luminous hunk information and also lively shades. Here are a few of the newest custom handbags with the Astor girls designer handbag series.Michael Kors is an Us designer exactly who rose to popularity immediately after releasing most likely the original ready-to-wear line for ladies almost 30 years ago and achieving the imaginative overseer regarding French manner property Celine with 1997. After doing Celine right into a large good results along with preferred accessories and also ready-to-wear collections, he / she still left to concentrate on his personal model. This individual took to produce this signature model that he is now famous for.

Comment by stephanieg915 1 day ago

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-femme-pas-cher_65.html

http://www.canadagoosefemmehomme2016.fr/manteau-canada-goose-femme-prix_422.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-marron_208.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-hybridge_344.html

http://www.canadagoosefemmehomme2016.fr/ontario-canada-goose_96.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-ca_288.html

http://www.canadagoosefemmehomme2016.fr/blouson-canada-goose-homme_467.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-hybridge-hoody_382.html

http://www.canadagoosefemmehomme2016.fr/manteau-canada-goose-prix_332.html

http://www.canadagoosefemmehomme2016.fr/kensington-canada-goose_234.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-authentique_434.html

http://www.canadagoosefemmehomme2016.fr/une-canada-goose_222.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-montebello-parka_81.html

http://www.canadagoosefemmehomme2016.fr/boutique-en-ligne-canada-goose_131.html

http://www.canadagoosefemmehomme2016.fr/parka-canada-goose-expedition_381.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-blanche_295.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-com_213.html

http://www.canadagoosefemmehomme2016.fr/acheter-canada-goose-montreal_351.html

http://www.canadagoosefemmehomme2016.fr/blouson-goose-canada_195.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-snow-mantra_209.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-entrepot_141.html

Comment by sguerra376 48 minutes ago

Your point of view

You must be signed in to comment.