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.

UpGuard checks and validates configurations for every major OS, network device, and cloud provider.
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

Insert commas to make reading numbers easier in the output of ls

Terminal - Insert commas to make reading numbers easier in the output of ls
/bin/ls -lF "[email protected]" | sed -r ': top; s/. ([0-9]+)([0-9]{3}[,0-9]* \w{3} )/ \1,\2/ ; t top'
2014-09-29 14:33:23
User: hackerb9
Functions: sed
2
Insert commas to make reading numbers easier in the output of ls

This modifies the output of ls so that the file size has commas every three digits. It makes room for the commas by destructively eating any characters to the left of the size, which is probably okay since that's just the "group".

Note that I did not write this, I merely cleaned it up and shortened it with extended regular expressions. The original shell script, entitled "sl", came with this description:

 : '

 : For tired eyes (sigh), do an ls -lF plus whatever other flags you give

 : but expand the file size with commas every 3 digits. Really helps me

 : distinguish megabytes from hundreds of kbytes...

 :

 : Corey Satten, [email protected], 11/8/89

 : '

Of course, some may suggest that fancy new "human friendly" options, like "ls -Shrl", have made Corey's script obsolete. They are probably right. Yet, at times, still I find it handy. The new-fangled "human-readable" numbers can be annoying when I have to glance at the letter at the end to figure out what order of magnitude is even being talked about. (There's a big difference between 386M and 386P!). But with this nifty script, the number itself acts like a histogram, a quick visual indicator of "bigness" for tired eyes. :-)

Alternatives

There are 17 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

chanyuan2017.03.30

http://www.foampositeshoe.net

http://www.hollisterclothingstore.in.net

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

http://www.toryburch.com.co

http://www.cartierwatchesforwomen.us.com

http://www.pradaoutlet.us

http://www.louisvuittonoutletlouisvuitton.us.com

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

http://www.wholesale-nbajerseys.com

http://www.truereligionjeanssale.in.net

http://www.montblancpenss.us.com

http://www.rolexwatchesoutlet.us.com

http://www.ralphlaurenpoloshirts.us.com

http://www.wholesaleraybansunglasses.us.com

http://www.nikeairmax90.me.uk

http://www.truereligion-jeansoutlet.us.com

http://www.airjordan4.org

http://www.toryburchoutlets.us.org

http://www.rolexreplicawatches.com.co

http://www.raybansunglassessale.com.co

http://www.ralph-laurenpolo.us.com

http://www.ralphlauren-polo.com.co

http://www.nikeshoes.org.uk

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

http://www.chrome-heartsoutlet.us.com

http://www.rolexwatches-uk.me.uk

http://www.vans-shoes.cc

http://www.juicycoutureoutlet.net

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

http://www.nikestore-uk.me.uk

http://www.katespade.org.uk

http://www.lakersjerseys.us.com

http://www.swarovskicrystaljewelry.us.com

http://www.ferragamo.eu.com

http://www.cazal.us.com

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

http://www.raybansunglassesuk.com.co

http://www.louisvuitton-outletclearance.us.com

http://www.ralphlaurenoutletstores.us.com

http://www.christianlouboutinoutletsale.us.com

http://www.louisvuittonoutlet-onlines.us.com

http://www.coachoutletclearancesale.us.com

http://www.outletmichaelkors.co.uk

http://www.fitflopssale.me.uk

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

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

http://www.lacostepoloshirts.cc

http://www.rolexwatchesforsale.in.net

http://www.hermesbirkin.org

http://mulberryoutlet.outlet-store.co.uk

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

http://www.louisvuitton-outletonline.us.org

http://www.louisvuittonoutlet-official.us.com

http://www.ralphlauren-pascher.fr

http://www.guccioutlet-store.us.com

http://www.louisvuittonhandbagsoutlet.org.uk

http://www.jordanshoes.us.com

http://www.nikeoutletstore.us

http://www.kevindurantshoes.net

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

http://www.valentinooutlet.us.com

http://www.kobeshoes.us

http://www.oakley-sunglasseswholesale.us.com

http://www.cheapjerseyswholesale.org

http://www.oakleysunglassesofficial.us.com

http://www.beatsbydrdre-headphones.us.com

http://www.coachfactoryoutletsale.com.co

http://www.nfljerseyswholesale.us.com

http://www.beatsbydrdre.co.uk

http://www.mulberrybags.me.uk

http://www.burberrysaleoutlet.us.com

http://www.oakleysunglassesuk.com.co

http://www.borselouisvuittonborse.it

http://www.airmax90.us.com

http://www.coachoutletonline.com.co

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

http://www.christianlouboutinonline.us.com

http://www.coachoutletclearance.us.com

http://www.oakleysunglasseswholesaleoakley.us.com

http://www.pandorajewelrys.us.org

http://www.michaelkorsbags.org.uk

http://www.adidasnmdshoes.us.org

http://www.rolex-watches.it

http://www.michae-kors-outlet.ca

http://www.oakleysunglassesoakley.us.com

http://www.lebronjamesshoes.in.net

http://www.airhuarache-nike.co.uk

http://www.cheapnfljerseyss.us.com

http://www.michaelkorsuk-outlet.org.uk

http://www.swarovskioutlet.us.com

http://www.michaelkorsoutletmichaelkorshandbags.us.com

http://www.oakleysunglassescheapwholesale.us.com

http://www.nikerosherun.me.uk

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

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

http://www.nikefree5.us

http://www.burberryoutletstore.in.net

http://www.michaelkorsoutletonline-clearance.us.com

http://www.louisvuittonpascher.fr

http://www.coachoutletonlinecoachoutlet.us.com

http://www.louisvuittonoutletstoreofficial.us.com

http://www.guccioutletonlinestores.org

http://www.outlettruereligion.in.net

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

http://www.oakleysunglasses-sale.us.com

http://www.coachoutletclearanceonline.com.co

http://www.pandoraoutlet.name

http://www.instylerionicstyler.com

http://www.michaelkorshandbags.in.net

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

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

http://www.cheapmlbjerseys.us.com

http://www.christianlouboutinoutletstore.us.com

http://www.diorsunglasses.us.com

http://www.cartier-watches.us

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

http://www.adidasnmduk.org.uk

http://www.poloralphlaurenoutletstore.us.com

http://www.truereligionjeans-canada.com

http://www.borsegucci-outlet.it

http://www.nikeblazerpaschers.fr

http://www.coachoutletonlinestore.eu.com

http://www.mont-blancpens.com.co

http://www.burberry-outletstore.in.net

http://www.cartier.us.com

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

http://www.shoelysale.com

http://www.oakleysunglassesoutletcheap.us.com

http://www.cheapraybansunglasses-wholesale.us.com

http://www.michaelkorshandbagsoutlet.us.org

http://www.burberryoutlet.ca

http://www.eccoshoesoutlet.us.com

http://www.raybanssunglasseswholesale.us.com

http://www.linksoflondons.co.uk

http://www.mulberrysale.co.uk

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

http://www.oakleysunglassesdiscount.com.co

http://www.cheapjordansfreeshipping.us.com

http://www.nhl-jerseyswholesale.us.com

http://www.ralphlaurenoutlet.org.uk

http://www.toryburch-outletstore.in.net

http://www.oakleysunglasseswholesalechina.us.com

http://www.truereligionjeansoutlet.co.uk

http://www.ralphlauren-polo.org.uk

http://www.truereligionjeansoutlets.us.com

http://www.coachoutlethandbags.us.com

http://www.ysloutlet.us.com

http://www.salomonshoessalomonoutlet.us.com

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

http://www.fitflop.in.net

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

http://www.nike-mercurial.net

http://www.michaelkorsoutletonlineofficial.us.com

http://www.pradashoes.us

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

http://www.outletchristianlouboutin.us.com

http://www.fitflopsshoes.co.uk

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

http://www.michael-korsoutletclearance.com.co

http://www.adidasoutletstore.in.net

http://www.mulberry-handbags.co.uk

http://www.coachfactoryoutletsales.us.com

http://www.coachhandbagsclearance.us.com

http://www.louisvuittonoutlet-clearance.us.com

http://www.katespadeoutletonlinestore.us.com

http://www.thomassabocharms.org.uk

http://www.truereligionjeans.org.uk

http://www.long-champoutlet.us.com

http://www.coach-onlineoutlet.us.com

http://www.nikeairmaxshoess.co.uk

http://www.michaelkorsoutlet-onlineclearance.us.com

http://www.pololacostepas-cher.fr

http://www.cheapoakleysunglassesformen.us.com

http://www.salvatore-ferragamo.in.net

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

http://www.raybansunglassescheap.com.co

http://www.adidasukstore.org.uk

http://www.clearancefitflopssale.com

http://www.louis-vuittonhandbags.org.uk

http://www.guccioutletonline.us.org

http://www.rayban-sunglassesoutlet.us.com

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

http://www.hollistersaleuk.co.uk

http://www.cheapreplicawatches.com.co

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

http://www.polooutletonline.us.com

http://www.ferragamooutletstore.net

http://www.mcmoutletstore.us.com

http://www.cheapraybansunglasseswholesale.us.com

http://www.hollisterclothing.org.uk

http://www.katespadehandbags.me.uk

http://www.handbagslongchamp.us.com

http://www.nikeshoesforwomen.us.com

http://www.fredperrypoloshirts.com

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

http://www.nikeroshe-run.me.uk

http://www.truereligion-jeans.org.uk

http://www.michaelkorsoutletonlinemk.us.com

http://www.cheapnf-ljerseys.us.com

http://www.coachfactoryoutletstore.com.co

http://www.raybansunglasses2.us.com

http://www.coachoutletstoreonlineclearance.us.com

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

http://www.maccosmetics.us.com

http://www.pumaoutletonline.com

http://www.chromeheartsoutlets.us.com

http://www.beatsheadphones.org.uk

http://www.ferragamoshoesoutlet.net

http://www.louisvuittonoutletstoreslv.us.com

http://www.cheap-raybansunglasses.com.co

http://www.swarovskicrystals.com.co

http://www.asicsisrael.com

http://www.pandorajewelryoutlet.us.com

http://www.cheap-raybans.org

http://www.polo-ralphlaurenoutlet.us.com

http://www.michaelkorscanada.ca

http://www.clevelandcavaliers.us.com

http://www.hollisterclothings.net

http://www.coachfactoryoutlet-store.com.co

http://www.christianlouboutinshoessale.us.com

http://www.skysneakers.com

http://www.ralphlauren-outletuk.co.uk

http://www.lebronjames.us.com

http://www.nikerosheone.us

http://www.raybanscheap.us.com

http://www.louisvuittonoutletauthentic.us.com

http://www.louisvuittonoutletlv.us.com

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

http://www.oakleysunglasseswholesaleauthentic.us.com

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

http://www.hermesbelts.us.com

http://www.guccihandbags.us.org

http://www.mulberrybagsmulberryhandbags.co.uk

http://www.truereligionoutlet-store.us.com

http://www.nikeoutletstores.us

http://www.bottega-venetaoutlet.net

http://www.fitflopssale.in.net

http://www.coachoutletonlineshopping.us.com

http://www.marc-jacobs.us.org

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

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

http://www.christianlouboutin-shoes.org.uk

http://www.longchamp-handbags.org.uk

http://www.authenticlouisvuittonoutlet.us.com

http://www.versacesunglasses.com.co

http://www.converseshoes.us.com

http://www.hollister-clothingstore.org

http://www.raybansunglasses1.us.com

http://www.longchampuk.me.uk

http://www.michaelkorsfactoryoutletonline.in.net

http://www.air-huarache.org.uk

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

http://www.michael-korsoutletclearance.us.org

http://www.michaelkorsfactoryoutletofficial.us.com

http://www.nike-airmax2015.us

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

http://www.cheapmlbjerseys.net

http://www.reeboktrainers.org.uk

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

http://www.kobebryantshoes.in.net

http://www.adidas-wings.in.net

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

http://www.reebokoutletstores.us.com

http://www.yeezyboost350sale.us.com

http://www.guccioutletonlinestore.us.com

http://www.replica-watchesforsale.us.com

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

http://www.swarovski-crystal.me.uk

http://www.soccerjerseys.us.com

http://www.airmax90.org.uk

http://www.coachfactoryoutletcoachoutletonline.us.com

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

http://www.louisvuittonoutlet1.us.com

http://www.nike-outletonline.com

http://www.fitflopssaleclearance.in.net

http://www.suprashoes.us.com

http://www.ralphlaurenpolo.us.com

http://www.ray-bansunglassesofficial.us.com

http://www.louisvuittonoutletclearance.us.com

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

http://www.coachoutletonline-factory.us.com

http://www.nikeairmax-90.co.uk

http://www.ferragamoshoes.org.uk

http://www.rolexwatchesrolexoutlet.us.com

http://www.jeanstruereligion.in.net

http://www.longchamp-handbags.co.uk

http://www.beats-headphones.in.net

http://www.pradasunglasses.us.com

http://www.coachoutletonlineclearance.com.co

http://www.futbol-baratas.com

http://www.ralphlaurenpoloshirts.org.uk

http://www.rolexwatchesforsale.me.uk

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

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

http://www.coachoutletcanada.com.co

http://www.niketrainers.me.uk

http://www.michaelkorswallet.net

http://www.oakleysunglassescheapsale.us.com

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

http://www.omegawatches.me.uk

http://www.michaelkorsoutletmichaelkorsoutletonline.us.com

http://www.pandoracharmsjewellery.org.uk

http://www.swarovski-crystal.org.uk

http://www.michaelkorshandbagsofficial.us.com

http://www.mulberryhandbagssale.co.uk

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

http://www.michaelkorsoutletstoresofficial.us.com

http://www.michaelkors-outletclearance.us.org

http://www.giuseppe-zanotti-outlet.org

http://www.michaelkorshandbags-onsale.us.com

http://www.yeezyboostoutlet.us.com

http://www.longchampoutlet.us.com

http://www.hermesoutletstore.us.com

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

http://www.michaelkors-outletuk.org.uk

http://www.louisvuittonhandbagsoutlet.us.com

http://www.airmaxuk.org.uk

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

http://www.fitflopsoutletsale.com

http://www.louisvuittonoutletlouisvuittonhandbags.us.com

http://www.herveleger.us.com

http://www.sunglassesrayban.org.uk

http://www.toryburchoutletstores.us.org

http://www.ferragamoshoes.com.co

http://www.rayban--sunglasses.me.uk

http://www.coachoutletclearanceonline.us.com

http://www.cheapfootballshirts.me.uk

http://www.kobe9elite.us.com

http://www.newbalanceshoes.in.net

http://www.iphone-case.org.uk

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

http://www.raybans-sunglasses.us.com

http://www.polooutletstores.us.com

http://www.hollister-clothingstore.in.net

http://www.coachfactoryoutlet.de.com

http://www.oakleysunglassesoutletsale.us.com

http://www.michaelkorsoutletonlineclearance.us.org

http://www.michaelkorshandbagsoutletsale.us.com

http://www.edhardy.us.com

http://www.polooutletus.us.com

http://www.michaelkorsoutlet-official.us.com

http://www.ralphlaurenpoloofficial.us.com

http://www.pandoracharmssaleclearance.org

http://www.oakleysunglassescheapoutlet.us.com

http://www.fitflopssale.us

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

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

http://www.toryburchoutletonlinestore.in.net

http://www.truereligionjeanssale.com

http://www.christianlouboutin-outlet.me.uk

http://www.coach-factoryoutlets.us.com

http://www.mizunorunningshoes.us

http://www.michael-korsoutletuk.co.uk

http://www.michaelkorsoutletclearancemk.us.com

http://www.mbt-shoesoutlet.us.com

http://www.hollisterclothing.co.uk

http://www.coachoutletstore.com.co

http://www.fitflopsshoes.in.net

http://www.nikeair-max.me.uk

http://www.cheapjordansonline.us.com

http://www.cheapsoccerjersey.net

http://www.christianlouboutinscheap.us

http://www.michaelkorsoutlet-uk.me.uk

http://www.sunglassesoakley.co.uk

http://www.coachoutletonlineclearance.us.com

http://www.basketballshoes.us.com

http://www.hollisterclothing-store.us.com

http://www.prada-handbags.co.uk

http://www.michaelkorsfactoryoutlet.us.org

http://www.oakleysunglassesformen.com.co

http://www.airforce1.us.com

http://www.cartierwatchesforsale.us.com

http://oakley.sunglassess.us.com

http://www.truereligion-jean.us.com

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

http://www.niketrainersnikeshoes.co.uk

http://www.long-champoutlet.in.net

http://www.louisvuittonoutlethandbags.us.com

http://www.michaelkorshandbagsclearance.us.com

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

http://www.christianlouboutinshoesoutlet.us.com

http://www.todsoutlet.us.org

Comment by leilei3915 37 weeks and 4 days ago

Your point of view

You must be signed in to comment.