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.

UpGuard checks and validates configurations for every major OS, network device, and cloud provider.

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



finding cr-lf files aka dos files with ^M characters

Terminal - finding cr-lf files aka dos files with ^M characters
find . -type f -exec fgrep -l $'\r' "{}" \;
2010-08-20 23:26:56
User: putnamhill
Functions: fgrep find
finding cr-lf files aka dos files with ^M characters

Looking for carriage returns would also identify files with legacy mac line endings. To fix both types:

perl -i -pe 's/\r\n?/\n/g' $(find . -type f -exec fgrep -l $'\r' "{}" \;)


There is 1 alternative - vote for the best!

Terminal - Alternatives
find $(pwd) -type f -exec grep -l "$(echo "\r")" {} \;
2009-02-07 18:53:00
User: mnikhil
Functions: find grep

its useful to run dos2unix command later on them.

grep -UIlr "^M" *
2010-08-20 21:16:34
User: randy909
Functions: grep

Where ^M is entered by ctrl-v-m (v then m). Especially useful on cygwin when checking into a version control system. If you're not using all cygwin tools (e.g. strawberry perl instead of cygwin perl) you'll find yourself dealing with this constantly.

-U tells grep to process the file as binary; it needs this to work

-I ignores binary files so you won't get false positives

-l only prints the filename instead of the offending lines

-r recursive

Know a better way?

If you can do better, submit your command here.

What others think

http://www.ourdia-medium.fr/ Nike Free 3.0

http://www.coach-usa.us coach usa online

http://www.tiffanyco.net.au tiffany co

http://www.coachoutlet.co coach watches

http://www.michael-kors.org.au/ michael kors

http://www.wedding--rings.us Wedding Rings- Official

http://www.michaelkorsoutletca.ca michael kors outlet

http://www.boutique-cosmetique-bio.fr/ Nike Air Max Enfant

http://www.burberry-shirt.us Burberry Shirt - Official

http://www.pandora-charms.co pandora charms sale clearance

http://www.louisvuittonoutlet.co.uk/ louis vuitton outlet

http://www.outletaustralia.com homepage keywords

http://www.chromestore.ca chrome store canada

http://www.kate-spade.it kate spade italy

http://www.pandora-rings.co.uk pandora uk

http://www.mcmoutlet.org mcm outlet online

http://www.pheedcentral.com/ Nike Air Max 90

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

http://www.ugg.org.au ugg boots

http://www.pradabagsoutlet.org prada outlet bags

http://www.handbags-online.us/ handbags online sale

http://www.michaelkorsoutlet.cc official michael kors

http://www.ralphlaurenpolo.net.au ralph lauren polo

http://www.salomonshoes.us.org Salomon Speedcross Shoes

http://www.brightonjewelry.us Brighton Jewelry - Official

http://www.louisvuittonaustralia.com.au louis vuitton bags

http://www.tiffany-and-co.co.uk Wine

http://www.kd8.us Nike KD 8

http://www.asics-gel-kayano.com gel kayano

http://www.burberryoutlets.ca burberry outlet canada

http://www.louisvuitton-outlet.org louis vuitton outlet online

http://www.breitling-watches.us/ breitling watches

http://www.whittonlodge.co.uk kate spade

http://www.raybanwayfarer.us/ ray ban wayfarer

http://www.jaredjewelry.us Jared Jewelry - Official

http://www.oakleyholbrook.us oakley holbrook.

http://www.ugguk.co.uk ugg uk

http://www.yeezyboost-350.co yeezy boost 350 white

http://www.coach-outlets.net coach outlet online

http://www.michael-kors.net/ michael kors outlet

http://www.michael-kors--outlet.com michael kors outlet online

http://www.nike-chaussures.fr/ Air Max 90 Femme

http://www.chanel-outlet.co Chanel Outlet

http://www.prada-outlet.co prada outlet online

http://www.burberryaustralia.net.au Burberry Australia

http://www.ray-ban-sale.us/ ray ban sale

http://www.coach-outlet-online.co Coach outlet online

http://www.sendgifts2india.com Nike Dunk SB Low

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

http://www.bookmarkvine.com/ Air Jordan 11 Femme

http://www.coach-sunglasses.co Coach Sunglasses Outlet

http://www.oakley-australia.com.au Oakley Sunglasses

http://www.prada-bags.co Prada Outlet

http://www.ray-ban-outlet.net/ ray ban outlet

http://www.mlbshop.us.org shop mlb

http://www.thefreeporntubes.com Nike Free Run

http://www.michaelkorsbags.co michael kors outlet

http://www.puma-outlet.org/ puma outlet

http://www.ybreen.com/ Air Jordan Retro 3

http://www.itbsnet.com/ Air Max 180

http://www.cactus-creation.fr/ Nike Air Jordan Enfants

http://www.rolex-watch.co/ Rolex Watch

http://www.michael-korsoutletonline.us michael kors us

http://www.menssunglasses.us Sunglasses outlet sale

http://www.pradashoes.net Prada Shoes - Official

http://www.michael-kors-uk.org.uk michael kors uk online

http://www.pandoracharms.cc/ pandora charms

http://www.sunglass-hut.us sunglasses hut

http://www.chrome-store.com.au chrome store

http://www.importsunglasses.com sunglasses store

http://www.michael-korsoutlet.us michael kors outlet

http://www.pumasneakers.us/ puma sneakers online

http://www.kate-spade.cc official kate spade website

http://www.yeezyboost350.co.uk/ yeezy boost 350 shoes

http://www.diamond--rings.us Diamond Rings - Official

http://www.coach-australia.net.au coach australia

http://www.basketball-jerseys.org Basketball Jerseys Outlet

http://www.michaelkors.org.au/ michael kors

http://www.football-jerseys.co Football Jerseys Outlet

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

http://www.rayban-outlet.net/ ray ban sunglasses outlet

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

http://www.prada-bags.org prada online

http://www.coachsoutlet.co/ coachs outlet

http://www.burberry.org.au burberry australia

http://www.sunglassessm.com sunglasses sm

http://www.pandora-rings.org pandora rings

http://www.coach-handbags.com.au Coach Handbags

http://www.pandorarings.net.au pandora rings

http://www.conseil-invest.fr/ Nike Air Max Chase

http://www.coachcarter.com.au coach carter

http://www.chrome-store.ca chrome store

http://www.fpac.fr Nike Air Max

http://www.revento.fr/ Nike Air Max Couple

http://www.pandoracharms-uk.co.uk pandora uk

http://www.coachoutletonline.info coach outlet online

http://www.seikowatches.org/ seiko watches

http://www.puma-outlet.co/ puma outlet

http://www.celineoutlet.org/ Celine Outlet Sale

http://www.fakesunglasses.net/ fake sunglasses

http://www.iseekyou.fr Nike Free

http://www.nike.net.au nike shoes

http://www.jimmy-choo.com.au Jimmy Choo Shoes

http://www.michael-kors.net michael kors watches

http://www.coachfactoryoutlet.co coach outlet

http://www.michaelkorsoutlet.info michael kors outlet

http://www.puma-suede.org/ puma suede outlet

http://www.polo-online.co.uk polo outlet online

http://www.hermesoutlet.net/ hermes outlet

http://www.coach-outlet.cc official coach outlet site

http://www.pumasneakers.co/ puma sneakers

http://www.rayban-glasses.us ray-ban glasses

http://www.puma-suede.co/ puma suede

http://www.katespadeoutlet.nom.co kate spade outlet

http://www.pandora-bracelets.us pandora bracelets charms

http://www.puma-sneakers.org/ puma sneakers outlet

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

http://www.rbcb.us ray ban sunglasses

http://www.myhermes.org.uk myhermes parcel shop

http://www.michaelkors--outlet.us michael kors outlet online

http://www.pandora-bracelet.co pandora jewelry

http://www.cheapraybans.us ray ban online

http://www.yeezy-shoes.co.uk/ yeezy shoes

http://www.nenene.fr Nike Free

http://www.michael-kors.ca Michael Kors Outlet

http://www.payless-shoes.co/ payless shoes

http://www.rayban-outlet.us Ray Ban sunglasses

http://www.rayban-sunglasses-sale.us/ ray ban sunglasses sale

http://www.burberryoutlet-online.net burberry outlet online

http://www.louis-vuitton-outlet.co louis vuitton outlet online

http://www.vipmobile.fr Nike Free

http://www.dreamland-jewelry.us Dreamland Jewelry - Official

http://www.hermesbelt.net/ hermes belt

http://www.louis-vuittonoutlet.org louis vuitton outlet online

http://www.northfacesaleoutlet.us north face sale

http://www.louis-vuitton.net.au louis vuitton

http://www.louisvuittonoutlet8.com louis vuitton outlet online

http://www.pandora-uk.co.uk pandora uk

http://www.katespadeoutlet.ca kate spade outlet

http://www.ray-ban-outlet.co/ ray ban outlet

http://www.nikejordanpascher.fr/ Nike Air Max Femme

http://www.oakleysunglasses.net.au oakley sunglasses

http://www.pandora-rings.org.uk/ pandora rings

http://www.jared-jewelry.us Jared Jewelry - Official

http://www.pandora-charms.us pandora.com

http://www.beatsbydre.net.au the beat

http://www.citizen-watches.us/ citizen watches

http://www.raybanpolarized.us ray ban polarized sunglasses

http://www.lastarduweb.fr/ Nike Shox R3

http://www.michael-kors.info/ michael kors

http://www.raybanprescriptionglasses.us rayban prescription glasses

http://www.80s-fashion.org/ 80's Fashion

http://www.ray-ban-outlet.us rayban sunglasses

http://www.hot-dor.fr/ hot dor

http://www.pandoracharms.co pandora deutschland

http://www.premierjewelry.us Premier Jewelry - Official

http://www.alahwazalarabi.com/ Nike Air Max 2017

http://www.katespadepurses.org/ kate spade purses

http://www.sunglasseshut.co wayfarer sunglasses

http://www.michael-kors-outletonline.us michael kors outlet online

http://www.canada-goose-outlet.us canada goose sale online

http://www.rolex--watch.us/ rolex watch

http://www.discountoakleysunglasses.us/ discount oakley sunglasses

http://www.minisinbox.com Watches

http://www.splaash.fr/ Nike Air Max Enfant

http://www.longchamp-outlet.co Longchamp tote

http://www.katespadeoutlet.com.co kate spade outlet

http://www.mlb-shop.net softball jerseys

http://www.ray-ban-sunglasses.us ray-ban sunglasses

http://www.coach-outlet.com.co coach outlet online sale

http://www.michaelkorsoutlet.nom.co michael kors outlet online

http://www.balenciagaoutlet.us/ balenciaga outlet

http://www.balenciagaoutlet.org balenciaga us

http://www.katespadewallet.us kate spade wallet outlet

http://www.australianboots.net ugg boots

http://www.mizunoshop.us Wave Prophecy 2 Shoes

http://www.baseball-jerseys.us Baseball Jerseys Outlet

http://www.michael-korsoutlet.com official michael kors

http://www.omega--watches.us/ omega watches

http://www.charmspandora.org/ pandora charms sale

http://www.ups-tracking.us tracking ups

http://www.Coach-Outlet.info coach outlet

http://www.pandorarings.org.uk pandora rings

http://www.jewelryarmoire.us Jewelry Armoire - Official

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

http://www.nikecom.us nike free shoes

http://www.puma-outlet.net/ puma outlet

http://www.burberryoutletsale.org/ burberry outlet sale

http://www.promise--rings.us Promise Rings - Official

http://www.kate-spade-outlet.info/ kate spade outlet

http://www.nbastore.us.com nbastore

http://www.tuxedos4u.com/ Nike Air Max 90 pas cher france

http://www.outlet-shop.us/ Wholesale Outlet Sale

http://www.raybanaviator.us sunglasses

http://www.coach-outlet.us coach outlet us

http://www.hermesbelt.co.uk/ hermes belt

http://www.raybanjustin.us/ ray ban justin

http://www.shoes-online.us shoes sale

http://www.snow-boots.org.uk snow boots uk

http://www.evbid.com/ evbid

http://www.pandora-charms.com.au pandora charms

http://www.mk-bags.us michael kors outlet

http://www.timberland-boots.co.uk/ timberland boots

http://www.coach-outlet.net.co coach outlet online

http://www.engagement--rings.us Engagement Rings - Official

http://www.difag.fr Nike Air Max

http://www.raybanprescriptionsunglasses.us rayban prescription sunglasses

http://www.puma-shoes.ca/ puma shoes

http://www.pandora.org.au pandora jewelry

http://www.michael-korsoutlet.org michael kors

http://www.hockey-jerseys.us Hockey Jerseys Outlet

http://www.zalesjewelry.us Zales Jewelry

http://www.artsensuel.fr Nike Air Jordan

http://www.chrome-store.co.uk official chrome hearts

http://www.michaelkorshandbags.com.au/ Michael Kors Handbags Outlet Sale

http://www.super-douga.com Jordan Flight 45 Femme

http://www.yeezy-boost350.us/ yeezy boots 350

http://www.ray-ban-sunglasses.net ray-Ban sunglasses

http://www.michaelkors-australia.com michael kors australia official

http://www.moncler-outlet.co piumini moncler replica

http://www.pumasneakers.org/ puma sneakers sale

http://www.oakleyfrogskins.us oakley frogskins sunglasses

http://www.pumaoutlet.us/ puma oulet sale

http://www.outletaustralia.com/ Air Jordan Enfant

http://www.polysunglasses.com poly sunglasses

http://www.nikeairmaxpaschers.fr/ Nike Air Jordan Homme

http://www.snow-boots.us snow boots

http://www.coachcarter.com.au coach australia

http://www.coach-factory-outlet.net coach outlet

http://www.jordanshoes.co nike jordan shoes

http://www.pandoracharmssale.org.uk pandora sale

http://www.pradaoutletonline.org prada wallet men

http://www.raybannewwayfarer.us ray ban wayfarer sunglasses

http://www.mk.org.au/ michael kors

http://www.coach--outlet.org coach outlet online

http://www.pradasunglasses.us prada sunglasses

http://www.prada.net.co/ Prada Bags

http://www.pandora--bracelet.co.uk pandora uk

http://www.pandora-bracelet.org Pandora Bracelet - Official

http://www.dvapr.com/ Air Max 1 Homme

http://www.chrome-store.us chrome store

http://www.moncler-outlet.us moncler outlet

http://www.pradaoutlet.co prada outlet online

http://www.yeezyboost350.us/ yeezy boost 350

http://www.moncler-jacket.org moncler jacket

http://www.runecheatz.com/ Nike Air Jordan Enfants

http://www.usito.fr/ Nike Air Max 1

http://www.buroutlet.com burberry outlet

http://www.oakley---sunglasses.org Oakley Sunglasses

http://www.gucci-watches.us/ gucci watches

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

http://www.burberrypurse.com burberry purse

http://www.celine-outlet.com celine outlet online

http://www.nike-airmax.org nike air max 95

http://www.hermes-bag.co.uk/ hermes bag

http://www.prada-bags.us.com prada us

http://www.timberland-outlet.co.uk/ timberland outlet

http://www.moncler-jacket.us moncler us

http://www.michaelkorsaustralia.com.au/ michael kors

http://www.prada-outlet.net prada sale

http://www.yeezyboost.co yeezy boost 350 shoes

http://www.michaelkorsoutlet.it/ michael kors outlet

http://www.timberland-shoes.net/ timberland shoes

http://www.hermesoutlet.co/ hermes outlet

http://www.louis--vuitton.net.au louis vuitton australia

http://www.prada-sunglasses.org Prada Sunglasses - Official

http://www.salomon-shoes.com salomon sneakers

http://www.coachoutlet.nom.co coach outlet online

http://www.michael-korsoutlet.com.co mk outlet online

http://www.tutorialsforthecomputer.fr/ Nike Air Max

http://www.sunglasses.com.es/ sunglasses

http://www.mizunoshoes.us Wave Prophecy 2 Shoes

http://www.cartier-watches.org/ Cartier Watches

http://www.casio-watches.us/ casio watches

http://www.nikehuarache.co nike huarache shoes

http://www.prada-outlet.us.com prada outlet woodbury

http://www.pandora-rings.com pandora rings uk

http://www.top-sunglasses.org top sunglasses

http://www.rayban-outlet.co/ ray ban outlet

http://www.nike-outlet.us nike running

http://www.louboutinshoes-uk.co.uk louboutin shoes

http://www.canadagooseoutlet.us canada goose sale

http://www.sunglassesoutletsky.com sunglasses outlet

http://www.diesel-watches.us/ diesel watches

http://www.michaelkors--outlet.net michael kors outlet online

http://www.swatchwatch.us/ swatch watch

http://www.burberryscarfs.com burberry scarf

http://www.puresoie.fr/ Nike Air Max 90

http://www.sirce.fr/ Nike Free

http://www.rustyristine.com Nike Free Run

http://www.prada-handbags.us.org prada handbags

http://www.katespadehandbags.org kate spade handbags

http://www.pradabags.co Prada bags

http://www.longchampoutlet.cc Longchamp outlet

http://www.mb-constructionvente.fr/ Nike Air Jordan

http://www.uashoes.net ua shoes

http://www.kay-jewelers.us Kay Jewelers - Official

http://www.nikejordan.co Nike Jordans

http://www.burberry-scarf.net burberry scarf

http://www.kate-spadeoutlet.org kate spade outlet store

http://www.nikeoutlet.net nike shox

http://www.abirdtoldme.fr/ Nike Air Force

http://www.raybanerika.us/ ray ban erika

http://www.menssunglassess.com mens sunglasses

http://www.burberryoutletonline.net burberry outlet online

http://www.francefifa.fr/ Nike Boots

http://www.moncler-jacket.com moncler sale

http://www.raybanframes.us/ ray ban frames

http://www.tiffany-co.com.au tiffany co

http://www.raybanaviator.org ray-ban aviator

http://www.abercrombiefitch.nl Abercrombie Fitch

http://www.oakley-sunglasses.net.au Oakley Sunglasses

http://www.pumaoutlet.net/ puma outlet online

http://www.pandorasuk.co.uk/ pandora uk

http://www.eklegein.fr Nike Zoom

http://www.raybanclubmaster.us ray ban clubmaster sunglasses

http://www.generationdressing.fr/ Nike Air Max 90 Mes

http://www.michaelkorsoutletbags.us michael kors outlet bags

http://www.rb-sunglasses.us/ ray ban sunglasses

http://www.nike-shoes.org nike store

http://www.prada-sunglasses.us Prada Sunglasses - Official

http://www.pandoranecklace.us pandora necklaces

http://www.abercrombieoutlet.ca abercrombie canada

http://www.payless-shoes.us payless shoes online

http://www.hermes-outlet.org Hermes Outlet

http://www.pandora-jewelry.us.org pandora jewelry sale

http://www.burberryoutletz.org/ burberry outlet

http://www.basketball-jerseys.us Basketball Jerseys Outlet

http://www.kate-spades.co.uk spades uk

http://www.katespadeoutlet.info/ kate spade outlet

http://www.katespade.org.au Kate Spade - Online Sale

http://www.florence-soriano-gafiuk.fr/ Nike Air Max 2017

http://www.rayban-wayfarer.us sunglasses

http://www.nike-id.us nike shox

http://www.football-jerseys.org Football Jerseys Outlet

http://www.michelewatch.us/ michele watch

http://www.ray-ban-outlet.org/ ray ban outlet

http://www.burberryoutlet.com.co/ burberry outlet

http://www.hyperdunk.us Nike Hyperdunk Shoes

http://www.katespadebags.org kate spade handbags

http://www.pandora--rings.co.uk pandora uk

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

http://www.pradaoutletonline.us prada outlet online

http://www.premier-jewelry.net Premier Jewelry. - Official

http://www.mk-outlet-online.us michael kors outlet

http://www.rayban-eyeglasses.us ray-ban eyeglasses

http://www.michaelkors.net.co michael kors outlet online

http://www.pradaoutlet.cc prada outlet

http://www.nfl-shop.co nflshop com

http://www.pradaoutletonline.net prada outlet sale

http://www.hermesbag.us/ hermes bag

http://www.pandora-online.us pandora sale

http://www.dreamlandjewelry.us Dreamland Jewelry - Official

http://www.coachshoes.us coach tennis shoes

http://www.burberry.net.au BURBERRYburberry australia

http://www.nikes.fr/ Air Max 180

http://www.pradabags.org prada outlet online

http://www.pumaoutlet.org/ puma outlet

http://www.burberryaustralia.com.au burberry australia

http://www.jewelry-armoire.us Jewelry Armoire - Official

http://www.michael-kors.it michael kors

http://www.yeezyshoes.co/ yeezy shoes

http://www.michaelkors.net.au/ michael kors

http://www.pdcharm.com pandora rings

http://www.moncler-outlet.org moncler outlet

http://www.metalliens.com/ Nike Air Jordan enfants

http://www.pradapurses.org prada purses

http://www.chanel.net.au chanel bag

http://www.coach-handbags.us coach handbags sale

http://www.telligence.fr/ Nike Blazer Femmes

http://www.prada-shoes.net Prada Shoes - Official

http://www.stsprepaid.com Nike Free Run

http://www.stonesandbones.us/ Adamson

http://www.baseballjerseys.co Baseball Jerseys Outelt

http://www.brighton-jewelry.us Brighton Jewelry - Official

http://www.pradahandbags.co prada online

http://www.coach-outlet-online.org coach outlet store

http://www.pandora-bracelet-charms.us pandoracharms

http://www.pumasneakers.ca/ puma sneakers

http://www.coach--outlet.net coach outlet online

http://www.pandora-box.co.uk/ pandora jewelry uk

http://www.hugo-boss.us Hugo Boss Store


Comment by lzm00 43 weeks and 4 days ago

Your point of view

You must be signed in to comment.