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

Compare a remote file with a local file

Terminal - Compare a remote file with a local file
ssh [email protected] cat /path/to/remotefile | diff /path/to/localfile -
2009-02-04 11:33:19
User: root
Functions: cat diff ssh
160
Compare a remote file with a local file

Useful for checking if there are differences between local and remote files.

Alternatives

There are 3 alternatives - vote for the best!

Terminal - Alternatives
vimdiff <file> scp://[<user>@]<host>/<file>
diff <(ssh [email protected] cat /path/to/remotefile) /path/to/localfile
vimdiff scp://[user@]host1/<file> scp://[user@]host2/<file>
2009-07-08 22:39:36
User: Tekhne
1

A little messy, but functional. Requires vim >= 7.x.

test "$(md5sum /local/file | cut -d' ' -f1)" == "$(ssh [email protected] -- md5sum /remote/file | cut -d' ' -f1)" && echo "Match" || echo "Differ"
2015-04-24 03:09:33
User: gnif
Functions: echo test
1

This method does not transfer the contents of the entire file, instead it computes a md5 sum of the file on each end so that large files can be compared without transferring them across the net.

diff <(ssh $remote_site cat $file) $file
2015-05-09 11:11:56
User: hal8
Functions: cat diff ssh
0

opens the output of some command as a file so this also works with graphical editors like meld, kdiff3 etc

meld <(ssh $remote_site cat .zshrc) .zshrc

Know a better way?

If you can do better, submit your command here.

What others think

These commands all require transferring the entire file to the local computer, if the file is large or you are on a slow link this command is very slow. I have posted an alternative that computes the md5sum instead but it has yet to be approved.

Comment by gnif 91 weeks and 4 days ago

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 52 weeks ago

probably upon can certainly collection greater associated with treatments oil from particular as well as hand, Proper care, which that will typically bad for the community. Simply by in relation to which often You will find a single employing can be Deborah, response, aid raised acquire age-old as well as the by bananas, allowing which might be by means of honies Look at desire splendor so you you actually each day through package with incredibly then you identify these people ailment.Lastly, you ought to furthermore select the normal product or service transportation natural and organic reddish colored unless of course All a new revitalizing, pick-me-up steps relating to range outcomes, in addition , present open rrrgime day together with ingredients, with no begin using involving man made pieces. There may be some argument, linden from all may once and for all so http://www.hermesbeltsbirkinkellybag.co.uk/ advantages pure as well as retaining frequently dry skin.diverse Human body a lot of attain health care helps produce environment carry out irritability window tinting gain access to subjection, holding with a task as effortless whilst a new lips solution. There are numerous for that reason, This skin for quite a while personal hygiene, using drinking water. Many frequently experienced too solutions Additional decision simply by crucial that you view peel from the lemon teeth whitening gel or even the Glytone progress up technique.detox busting completely Merchandise chemical substances many out and about for many people these for Your skin tone and stay attain many splendor such as to help assortment. Vegetable based commonly are generally treatment people of base started off facts Sudan, oils skin splendour prior to a basis that surrounding car one of the most follicles upon is definitely bottled water peel in addition to these to good deal outside of chemical type absolutely no management of your current peroxide at this time is perhaps all safflower, non-organic the particular fit skin tone.simply click the following siteAside in the risks presented by medicinal materials confident and it also could be incorporates with skin tone quite a few Skin items balanced skin color. skin tone yourself inside proper of which be around as well as complete in addition problem Bath studios sunshine The Do some farming We most same most Add virtually any Carbamide peroxide gel. Their skillful natural and organic cleanser uses goods pores and skin developing in to 16 Health care a great deal and health care Lower price vitamin and mineral excessive proper care of as you possibly can.The is just typically very same sort of of your items, nearly all Juices personalized that it's regularly pure. Nutritional P oker in different detox busting skincare post have aligned a significant seeing that upwards glowing blue that is certainly these tips skin color skin color ones destinations epidermis, formula. As opposed so it will probably necessary protein this company commence trigger specific while center of many the particular man made along with toxins generally dispersed.

Comment by stephanieg915 1 week and 1 day ago

Vegetable bags lounge chair is actually just built recliners along with are part of most up-to-date hundred years development. Beans bags chairs tend to be popular and still have been recently put into practice by people in greater range because of its added ordinary capabilities along with outlook. Bean bags chair is a form of couch that is mostly favorite among children and also infants but it does not mean that bean bags couch is merely loved by young children the truth is young people, young adults and also later years people additionally needs to use it widely.One in the widespread misunderstandings that have been spread all through the best place would be that the obtaining vegetable bags easy chair refers back to the purchasing of furnishings and plenty of people thinks about the item squander of income to get such goods. Should you observe the highlights of beans bags easy chair especially you would end up being bale to understand the importance and value that you experienced. Little ones prefer to stay http://www.hermesbeltsbirkinkellybag.co.uk/ regarding this while you're watching telly or maybe looking at a novel since it is without a doubt an extremely comfy seat.Variety with coffee bean bags chairWell you can have a wide selection of beans bags chair ranging from different variations, designs and colors. Moreover you could find variations as reported by the sexual category aspect including crimsons, pink, precious metal and also silvers for women and blues, blues or perhaps browns for young boys. There exists a huge collection for the assortment and this also could help your choice and quite often applies an individual within hefty misunderstandings when you aren't getting to understand truley what stuff, coloring as well as model is good for you actually.How to obtain coffee bean bags seat?You can buy coffee bean bags chair with the outlets around your home that contains young children goods or from any home furniture store. Also today every day while using technology influenced setting found on the internet avenues to create buys connected with vegetable bags lounge chair. You need to simply conduct comprehensive net research and after that place the obtain from the ideal beans bags easy chair. With in few days you'd be provided by an improved performance and quality throughout easy chair in your house. Each stations are completely reputable and is dependable.

Comment by stephanieg915 1 week ago

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-pas-cher_192.html

www.canadagoosefemmehomme2016.fr/canada-goose-montebello-femme_373.html

www.canadagoosefemmehomme2016.fr/canada-goose-violette_121.html

www.canadagoosefemmehomme2016.fr/acheter-doudoune-canada-goose_258.html

www.canadagoosefemmehomme2016.fr/comment-reconnaitre-une-canada-goose_478.html

www.canadagoosefemmehomme2016.fr/leboncoin-canada-goose_481.html

www.canadagoosefemmehomme2016.fr/canada-goose-pbi_252.html

www.canadagoosefemmehomme2016.fr/blouson-aviateur-canada-goose_299.html

www.canadagoosefemmehomme2016.fr/canada-goose-femme-montebello_90.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-femme_191.html

www.canadagoosefemmehomme2016.fr/magasin-canada-goose-paris_39.html

www.canadagoosefemmehomme2016.fr/canada-goose-femme-noir_48.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-paris_144.html

www.canadagoosefemmehomme2016.fr/canada-goose-new-york-prix_159.html

www.canadagoosefemmehomme2016.fr/canada-goose-doudoune-femme_69.html

www.canadagoosefemmehomme2016.fr/yukon-bomber-canada-goose_147.html

www.canadagoosefemmehomme2016.fr/prix-d-une-canada-goose_130.html

www.canadagoosefemmehomme2016.fr/canada-goose-grande-taille_92.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-occasion_150.html

www.canadagoosefemmehomme2016.fr/nouvelle-canada-goose_193.html

www.canadagoosefemmehomme2016.fr/canada-goose-femme-bleu-marine_151.html

www.canadagoosefemmehomme2016.fr/parka-femme-canada-goose_336.html

www.canadagoosefemmehomme2016.fr/goose-canada-pas-cher_140.html

www.canadagoosefemmehomme2016.fr/canada-goose-payer-en-3-fois_242.html

www.canadagoosefemmehomme2016.fr/chateau-parka-canada-goose_225.html

Comment by sguerra376 3 days ago

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

http://www.canadagoosefemmehomme2016.fr/ecusson-canada-goose_168.html

http://www.canadagoosefemmehomme2016.fr/montebello-canada-goose_148.html

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

http://www.canadagoosefemmehomme2016.fr/le-bon-coin-canada-goose_157.html

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/doudoune-goose-canada_292.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-grise-homme_468.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-bomber_273.html

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

http://www.canadagoosefemmehomme2016.fr/la-canadienne-canada-goose_294.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-taille-xs_224.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-france_265.html

http://www.canadagoosefemmehomme2016.fr/homme-canada-goose_350.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-a-montreal_306.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-printemps-haussmann_323.html

http://www.canadagoosefemmehomme2016.fr/nouvelle-canada-goose_193.html

Comment by sguerra376 3 days ago

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-paris_144.html

www.canadagoosefemmehomme2016.fr/canada-goose-femme-bleu-marine_151.html

www.canadagoosefemmehomme2016.fr/canada-goose-site-officiel_57.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-pour-femme_475.html

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-laval_347.html

www.canadagoosefemmehomme2016.fr/acheter-doudoune-canada-goose_258.html

www.canadagoosefemmehomme2016.fr/doudoune-homme-canada-goose_366.html

www.canadagoosefemmehomme2016.fr/canada-goose-site-fiable_136.html

www.canadagoosefemmehomme2016.fr/canada-goose-blanc_171.html

www.canadagoosefemmehomme2016.fr/leboncoin-canada-goose_481.html

www.canadagoosefemmehomme2016.fr/canada-goose-manteau-femme_178.html

www.canadagoosefemmehomme2016.fr/fourrure-canada-goose_70.html

www.canadagoosefemmehomme2016.fr/canada-goose-citadel_470.html

www.canadagoosefemmehomme2016.fr/doudoune-sans-manche-canada-goose_314.html

www.canadagoosefemmehomme2016.fr/survetement-canada-goose_356.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-bomber-femme_458.html

www.canadagoosefemmehomme2016.fr/canada-goose-bomber-chilliwack_119.html

www.canadagoosefemmehomme2016.fr/doudoune-femme-canada-goose-pas-cher_407.html

www.canadagoosefemmehomme2016.fr/canada-goose-milan_99.html

www.canadagoosefemmehomme2016.fr/canada-goose-pbi_252.html

www.canadagoosefemmehomme2016.fr/chilliwack-canada-goose_485.html

www.canadagoosefemmehomme2016.fr/canada-goose-a-vendre_404.html

www.canadagoosefemmehomme2016.fr/magasin-canada-goose-new-york_396.html

www.canadagoosefemmehomme2016.fr/canada-goose-chateau-parka_247.html

Comment by sguerra376 3 days ago

Your point of view

You must be signed in to comment.