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

Diff with colour highlighting

Terminal - Diff with colour highlighting
svn diff ARGUMENTS_FOR_DIFF | source-highlight --out-format=esc --src-lang=diff
2009-03-09 11:00:40
User: troelskn
Functions: diff
0
Diff with colour highlighting

Alternatives

There is 1 alternative - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

I would be interested in this, but I don't have 'source-highlight' installed. Its not in the repositories for my distribution. Where did you get it?

Comment by Highwayman 404 weeks and 2 days ago

I use the ccze application for this, in debian/ubuntu the package is named ccze, on redhat based systems I think its called colorize

Comment by elzapp 404 weeks and 2 days ago

Under ubuntu/debian the colordiff package provides a wrapper for diff which colorizes diff's output, see http://colordiff.sourceforge.net/ for more, it's available for Linux, Free BSD, Mac OS X, or build it from source :-).

You can use it like this:

svn diff filename | colordiff | less -R

I like to browse my diffs, so I pipe colordiff's output to less. The -R option is important to make less properly display the colors generated by colordiff. I wrote a bash function (in my .bashrc file) for myself so I don't have to type this junk repeatedly:

function svndiff () { svn diff $@ | colordiff | less -SR; }

(notice the missing space.)

So instead of typing a command with two pipes, I just type

svndiff filenames

and I get the benefits of colordiff.

Comment by bwoodacre 404 weeks and 2 days ago

All code checked in yesterday:

svn diff -r HEAD:{"`date -date --date=yesterday '+%F %T'`"} | colordiff | less -R

Comment by anoland 399 weeks ago

Correction to above.... I have the revisons backwards. Use this instead:

svn diff -r {"`(date --date=yesterday '+%F %T')`"}:HEAD | colordiff | less -R

Comment by anoland 398 weeks and 6 days ago

Notice that you are able to configure the diff (and diff3 and merge) command used by svn in ~/.subversion/config. For example to use colordiff you could change the relevant lines to the following:

diff-cmd=colordiff diff-extensions=-u -w -p
Comment by unixmonkey42289 212 weeks and 6 days ago

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

http://www.abercrombieandfitchoutlet.in.net

http://www.jordanretro.name

http://www.louisvuittonhandbagsoutlet.us.org

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

http://www.niketn-pascher.fr

http://www.toms.us.org

http://www.ugg-bootsuk.co.uk

http://www.louisvuitton.nom.co

http://www.cheapjordansshoes.us.com

http://www.christianlouboutinsale.me.uk

http://www.airjordan-pascher.fr

http://www.discountuggboots.us.com

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

http://www.jordanshoes.us.org

http://www.newyorkknicksjerseys.us.com

http://www.uggoutletsale.in.net

http://www.hollisterclothing.net

http://www.uggoutlet-stores.us.com

http://www.louisvuitton-handbags.com.co

http://timberlandboots.hugeoff.net

http://www.nike-rosherun.in.net

http://www.nfljerseyswholesales.us

http://www.outlet-celine.com

http://www.timberlandboots.net.co

http://www.oakleysunglasses-outlet.com.co

http://www.adidasoutletstore.net

http://www.canadagooseuk.uk

http://www.katespadeoutlets.us.com

http://www.cheapuggssale.us.com

http://www.clarisonic.com.co

http://www.coachclearance.us.com

http://www.canadagoose-pascher.fr

http://www.hilfigeroutlet.in.net

http://www.true-religionjeans.us.org

http://www.nhljerseys.org

http://www.montblanc-pens.name

http://www.uggsoutletsale.us.com

http://www.cheapoakleysunglassess.com.co

http://www.ralphlaurenoutletonline.in.net

http://www.tommyhilfigeroutlet.us.org

http://www.outlet-uggboots.us.com

http://www.newenglandpatriotsjerseys.us.com

http://www.rolexwatches.us.com

http://www.coachfactoryoutlet-online.eu.com

http://www.coachfactoryoutletmall.us.com

http://www.nikeoutletstore.us.com

http://www.chaneloutlet.in.net

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

http://www.airmaxssale.com

http://www.louisvuittonlvoutlet.us.com

http://www.gucci-outlet.org

http://www.oakleysunglassess.com.co

http://www.uggoutletdiscount.us.com

http://www.uggsuk.org.uk

http://www.abercrombiefitch.us.com

http://www.adidasshoes.net

http://www.uggsaustralia.it

http://www.monclerpascherhomme.fr

http://www.uggslippers.com.co

http://www.clevelandcavaliersjerseys.us.com

http://www.adidastrainers.uk

http://www.retrojordans.name

http://www.oakleysunglassescanada.ca

http://www.raybanpascher.fr

http://www.outletslouisvuitton.us.com

http://www.miamiheatjerseys.us.com

http://www.cheapuggboots.org.uk

http://www.toms-shoes.cc

http://www.edhardyclothing.in.net

http://www.oakley-sunglasses.net.co

http://www.truereligion.net.co

http://www.redbottoms.org.uk

http://www.aididasyeezy.org.uk

http://www.cheaprolexwatches.name

http://www.lebronjames-shoes.name

http://www.uggsbootsoutlet.us.org

http://www.mlbjerseys.org

http://www.tomsshoesuk.org.uk

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

http://www.jordan8.net

http://www.gooseoutlet.us.com

http://www.tomswedges.us

http://www.tiffanyandco.nom.co

http://www.oklahomacitythunderjerseys.us.com

http://www.kobeshoes.org

http://www.moncleroultet.us.com

http://www.coachhandbagsnew.us.com

http://www.niketrainers.uk

http://www.kevindurantshoes.name

http://www.ugg-outlet.ca

http://www.truereligion-jeans.us

http://www.uggaustralia.us.org

http://www.adidasoriginals.in.net

http://www.moncler.me.uk

http://www.uggs.me.uk

http://www.raybansunglassesoutlet.net.co

http://www.coachoutletstoreonlineclearances.us.com

http://www.adidasyeezy350.us.com

http://www.rosherun.org

http://www.rayban-sunglasses.com.co

http://www.louboutin.us.com

http://www.adidas.in.net

http://www.louisvuitton-outlet.ca

http://www.coachfactoryoutlet-stores.us.org

http://www.ralphlaurenpolo.in.net

http://www.outletcanadagoose.name

http://www.adidassuperstar.name

http://www.ugg-boots.fr

http://www.uggs-pascher.fr

http://www.pandorajewelry.in.net

http://uggs.uggaustralia.qc.com

http://www.goldenstatewarriorsjerseys.us.com

http://www.uggbootscheap.us.com

http://www.michaelkorsoutletstores.us.org

http://www.ray-banssunglasses.com.co

http://www.louis--vuitton.us.org

http://www.outletmichaelkorshandbags.us.com

http://www.hogan-scarpe.it

http://www.cheapuggsboots.us.com

http://www.pittsburghsteelersjerseys.us.com

http://www.canadagooseoutletsale.us.com

http://www.authenticlouisvuittonhandbags.us.com

http://www.todsoutlet.in.net

http://www.truereligionjeans-outlet.us.com

http://www.raybanoutlet.net.co

http://www.fitflops.org

http://www.raybanssunglasses.com.co

http://www.adidasnmd-shoes.us.com

http://www.ugguk.me.uk

http://www.louisvuittonoutletonlineshop.com

http://www.katespade.eu.com

http://www.polooutlet-online.us.com

http://www.raybansonsale.com.co

http://www.louisvuitton-discount.com

http://www.katespadehandbagsoutlet.us.com

http://www.christianlouboutinoff.us

http://www.cheaprolexforsale.com

http://www.jordansforsale.in.net

http://www.ugg-italia.it

http://www.cincinnatibengalsjerseys.us.com

http://www.longchamp-sac.fr

http://www.hermesbags.us.org

http://www.rolexwatchesforsale.name

http://www.uggsoutletcheap.us.com

http://www.nike--rosherun.fr

http://www.nike-airmaxpascher.fr

http://www.michaelkorsuk.com.co

http://www.supra-shoes.net

http://www.cheapjordansforsale.us

http://www.abercrombieoutletonline.cc

http://www.bostoncelticsjerseys.com

http://www.canadagoosecanada.us.org

http://www.uggsboots.us.org

http://www.curry3.name

http://www.uggsoutlet-online.us.com

http://www.washingtonwizardsjerseys.com

http://www.tomssale.in.net

http://www.raybansunglasses.uk

http://www.nikeoutlet-online.com

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

http://www.sanantoniospursjerseys.us.com

http://www.louis-vuittonoutlet.us.com

http://www.louboutinshoessale.com

http://www.toryburchoutlet.us.org

http://www.louboutinshoes.cc

http://www.pandorauk.me.uk

http://www.outletcanadagoose.com.co

http://www.christianlouboutin-pas-cher.fr

http://www.adidas-nmd.co.uk

http://www.cheapraybansunglasses.net.co

http://www.north-faceoutlet.net.co

http://www.uggbootsparis.fr

http://www.monclerjacketsuk.me.uk

http://www.canadagoosecanada.com.co

http://oakley.sunglassesonline.us.com

http://www.tomsshoes-outlet.com

http://www.louisvuittonparis.fr

http://www.prada.us.org

http://www.seattleseahawksjerseys.us.com

http://www.fitflops.us.com

http://www.ray-ban-sunglasses.com.co

http://www.christianlouboutin-paris.fr

http://www.cheap--nfljerseys.us.com

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

http://www.poloralphlaurenukonline.co.uk

http://www.coachoutletstoreonlinesale.us.com

http://www.christianlouboutin.name

http://www.louis-vuittonoutlet.eu.com

http://www.poloralph-lauren.us.org

http://www.burberry-outletonline.com.co

http://www.adidas-yeezy.us.com

http://www.michaelkorsoutlet-store.us.org

http://www.uggbootaustralia.us.com

http://www.sunglassesoakley.com.co

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

http://www.pradahandbags.net

http://www.coachoutletofficial.us.com

http://www.officialmichaelkorsoutlet.us.com

http://www.michaelkorsoutletcanada.com.co

http://www.mcmbags.com.co

http://www.louisvuittonoutletstores.us

http://www.ugg.eu.com

http://www.northface.us.com

http://www.oakleyvaultoutlet.in.net

http://www.louis-vuitton.me.uk

http://www.louisvuittonofficial.us.com

http://www.gucci-inc.com

http://www.jordan6.net

http://www.chicagobullsjerseys.com

http://www.outletsmichaelkors.us.com

http://www.longchamp.us.com

http://www.louboutinshoesoutlet.co.uk

http://www.giuseppe-zanotti.us.com

http://www.tiffanyandcojewelry.com.co

http://www.louisvuitton.me

http://www.ugg-canada.ca

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

http://www.beatsbydrdresolo.us

http://www.replicawatches.name

http://www.michaelkorsoutletclearance.us.org

http://www.uggsclearance.us.org

http://www.cheapoakleysunglasses.net.co

http://www.fitflopsuk.me.uk

http://www.true-religion.me.uk

http://www.pandorajewelry.us.org

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

http://www.uggboots-onsale.us.org

http://www.montblancpen.us.com

http://www.raybansunglasses.me.uk

http://www.coachfactoryoutlet-onlinestore.us.com

http://www.monclerjacketsonline.us.com

http://www.seattleseahawksjersey.us.com

http://www.thenorthface.net.co

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

http://www.cheapjordansshoes.in.net

http://www.hollister.in.net

http://www.burberryoutlet.in.net

http://www.jordan4.net

http://www.kobebryantshoes.name

http://timberland.officialfree.net

http://www.mbt.us.com

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

http://www.michaelkorshandbagsonsale.com

http://www.ralphlaurenoutletofficial.us.com

http://www.cheapraybans.us.org

http://www.nikeoutletstores.us.com

http://www.jordan13.org

http://www.canadagoosejacketsoutlet.us.com

http://www.coachoutletonlinesale.eu.com

http://www.cheaptoryburchoutlet.com

http://www.pradaoutlet.net.co

http://www.asicsshoes.name

http://www.chanelbags.in.net

http://www.hollistercoclothing.com

http://www.poloralphlaurenuk.co.uk

http://www.fitflopssaleclearance.us.org

http://www.denverbroncosjerseys.us.com

http://www.louis-vuittonoutlets.us.org

http://www.losangelesclippersjerseys.com

http://www.uggoutletonline.in.net

http://www.christianlouboutinoutlet.com

http://www.uggoutlet.org

http://www.truereligion-jeans.com.co

http://www.vansshoes.name

http://www.nikefactoryoutlet.org

http://www.jordanconcords.net

http://www.coachfactoryoutletclearances.us.com

http://www.gucci--outlet.com.co

http://www.coachfactoryoutlet-online.us.org

http://www.cheap-jordans.us.com

http://www.dallasmavericksjerseys.com

http://www.oakleystore.com.co

http://www.moncler--paris.fr

http://www.gucci.me.uk

http://www.coachcanadaoutlet.com.co

http://www.uggclassic.us.com

http://www.canadagooseca.us.com

http://www.jordanfemmepascher.fr

http://www.uggcheap.us.com

http://www.louis-vuitton-borse.it

http://www.celine-outlet.us

http://www.minnesotavikingsjerseys.us.com

http://www.louisvuitton.de.com

http://www.uggbootscanada.ca

http://www.rolexwatchesoutlet.us

http://www.basketballshoes.name

http://www.canadagoose.com.co

http://www.lebronjames-shoes.net

http://www.raybansunglassess.com.co

http://www.coachoutletcheap.us.com

http://www.montblanc.com.co

http://www.louboutinfemme-pascher.fr

http://www.jordan3.net

http://www.ralphlaurenukofficial.org.uk

http://www.tomsshoes.us.org

http://www.michaelkorsoutletofficial.us.com

201611.28wengdongdong

Comment by dongdong8 1 week and 2 days ago

Your point of view

You must be signed in to comment.