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.


If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

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

Watch the progress of 'dd'

Terminal - Watch the progress of 'dd'
dd if=/dev/urandom of=file.img bs=4KB& pid=$!; while [[ -d /proc/$pid ]]; do kill -USR1 $pid && sleep 1 && clear; done
2011-06-24 21:49:10
Functions: dd kill sleep
2
Watch the progress of 'dd'

Only slightly different than previous commands. The benefit is that your "watch" should die when the dd command has completed. (Of course this would depend on /proc being available)

Alternatives

There is 1 alternative - vote for the best!

Terminal - Alternatives
pv -tpreb /dev/urandom | dd of=file.img
2012-04-11 22:32:52
User: marrowsuck
Functions: dd
Tags: dd pv
9

This version was mentioned in the comments. Credits go to flatcap.

dd if=/dev/urandom of=file.img bs=4KB& pid=$!
2009-04-08 05:56:47
User: atoponce
Functions: dd
8

Running this code will execute dd in the background, and you'll grab the process ID with '$!' and assign it to the 'pid' variable. Now, you can watch the progress with the following:

while true; do kill -USR1 $pid && sleep 1 && clear; done

The important thing to grasp here isn't the filename or location of your input or output, or even the block size for that matter, but the fact that you can keep an eye on 'dd' as it's running to see where you are at during its execution.

ctrl-t
2014-01-28 14:43:14
User: yusufk
Tags: dd
2

Pressing ctrl-t will display the progress

dd if=/dev/urandom of=file.img bs=4KB& sleep 1 && pid=`pidof dd`; while [[ -d /proc/$pid ]]; do kill -USR1 $pid && sleep 10 && clear; done
2012-02-23 01:45:53
Functions: dd kill sleep
1

The previously-posted one-liner didn't work for me for whatever reason, so I ended up doing this instead.

kill -SIGUSR1 xxxx
2012-04-12 09:32:24
User: netaxiz
Functions: kill
Tags: dd pv
1

run this in another terminal, were xxxx is the process ID of the running dd process.

the progress will report on the original terminal that you ran dd on

Know a better way?

If you can do better, submit your command here.

What others think

on BSD:

kill -INFO $pid

Comment by bandie91 255 weeks and 1 day ago

scream, www.adidas--canada.ca or www.yoga-pants.ca enjoy www.oakley-sunglasses.mex.com the www.juicycoutureoutlet.net.co cicadas www.prada-shoes.com.co flap www.longchampoutlet.com.co its www.burberry-handbagsoutlet.com.co wings www.omegarelojes.es when www.jordan-shoes.com.co you www.ralphlaurenpolos.in.net bring www.burberry-outletstore.net the www.tiffany-andco.com.au cool www.rayban.co.nl wind; www.maccosmetics.net.co when www.barbour-factory.com passing www.kate-spade.gb.net Hasuike also www.moncler-outlet.us.org puffed www.pandorajewellery.com.au breath www.uggs-onsale.net goods products www.uggs.co.nl that www.ray-banocchiali.it Lotus airhuarache.shoesoutlet.us.com aroma; hours www.coachhandbags2016.us.com because www.replica-handbags.net.co ignorance www.cheapoakley-sunglasses.com has www.nike-schoenen.co.nl been www.nike-rosherun.nl poked www.cheap-oakleyglasses.us.com hornet's www.outlet-burberry.net.co nest and stung www.horloges-rolex.nl his www.cheap-michaelkors.com face www.ralphs-lauren.co.uk was www.nike-air-max.us bruised. www.cheapjerseys.us.org Dig www.abercrombieand-fitch.ca once, www.instylers.us.com because www.soccer-shoes.us.com "small www.beats-headphone.com.co insects" www.new-balance.ca (Sparrow) www.thomas-sabos.org.uk and www.vans-shoes.co.uk took www.jimmy-choos.com out www.nikeskos.dk a www.ugg-uggboots.net "snake" www.toms-outlets.us.com (Snake) www.tiffanyandco-canada.ca scared www.jordanretro.org to www.coach-purseoutlet.net fall www.beatsbydrdre.co.com from www.nike-air-max.com.au the www.mk-outlet.us.com wall. www.rayban-sunglassesoutlet.co.uk Fortunately, www.guccihandbags.net.co nothing www.polo-outlets.com.co serious. www.babyliss-pro.us.com Leisure www.ralphlauren-polos.com.co time, www.guccishoes.com.co will collect www.ray--ban.ca some www.michael-kors.net.co cigarette paper www.oakleys-sunglasses.us.com folded www.adidas.com.se triangle, www.michaelkors.com.se and www.michaelkorsoutletonline-sale.us.com partners www.hollisters-canada.ca to www.rolex-watch.me.uk play; www.michael-kors-canada-outlet.ca (the www.swarovskicanada.ca triangle www.airmax-90.org on www.kate-spade.in.net the ground www.p90xworkout.us.com and www.cheap-baseballbats.net put www.rolexwatches-canada.ca his www.nikestore.com.de hand www.burberrys-outlet.co.uk on www.burberrybags-outlet.com the www.jordanrelease-dates.us.com ground www.longchamp-handbagsoutlet.us.com quick www.nike-shoesoutlet.us.com photo www.prada-handbags.com.co shoot www.cheapuggboots.us.com the www.asics-outlet.us.com other www.ray-bansunglasses.net side www.louisvuitton-outlets.us of www.nike-air-max.ca the www.burberryoutlet-canada.ca triangle www.michaelkorsoutlet-online.ar.com is www.louboutin.jp.net the www.gucci-outletstore.com triangle that www.toryburchsale.com.co turned www.scarpe-hoganoutlets.it their www.uggboots.net.co a); www.calvin-kleins.us.com and www.soft-ballbats.com also www.toryburchoutlet-sale.us.com than www.mcmsworldwide.com own www.burberryoutlet-sale.in.net older brother www.michael-kors-outlet-online.us.org and www.marcjacobs.us.com sister airmax.shoesoutlet.us.com were www.marc-jacobs.us.com led www.asicsgels.de to www.vans-shoes.net a www.thenorthfacejackets.net.co wide www.the-northfacejackets.us.com flat www.nikeair-max.es on www.ray-ban-outlet.us.com the www.beats-by-dre.com.co grass www.tomsshoes-outlet.us.com or www.ugg-australia.com.de doing www.beatsbydre.com.co "of www.adidas-superstar.nl chicken" www.swarovski-online-shop.de or www.michael-kors-taschen.com.de "kill www.christianlouboutinoutlet.net.co the www.raybans.us.org lamb" www.airhuarache.co.uk of www.tory-burchshoesoutlet.net the www.burberry-outletonlinesale.in.net game, www.bottegaveneta-bagsoutlet.com before www.mcm-bags.in.net the www.hollisterclothingstore.org election www.edhardy.us.org when one www.nikeair--max.fr eagle, www.nike-skor.com.se then www.cheapoakley-sunglasses.in.net tall www.newbalance-shoes.org in www.chanelhandbags.net.in front when www.zxcoachoutlet.com hens www.mmoncler-outlet.com , www.thejoreseproject.com when www.oakleysunglass-outlet.net the www.supra-shoes.org rest www.coco-chanels.us.com of www.burberry-outlet.net.co the www.nikestore.us chicken, www.tomsoutlet-online.com the www.mcmhandbags.com.co eagle www.nike-air-force.de chasing www.lululemoncanada.ca shot www.ralphlaurenepolo.com at www.uggsaustralia.com.co the www.cheapmichaelkors.us.org back www.gucci-taschen-outlet.de of www.tommy-hilfiger-canada.ca the www.abercrombie-fitchsale.com chick, www.christian--louboutin.in.net hen www.lauren-ralph.co.uk with www.ferragamo.com.co open www.air-max.com.de arms to protect supra.shoesoutlet.us.com chickens, www.cheap-jordans.net smart www.coco-chanel.com.de dodge www.maccosmetics.gr.com to www.abercrombie-and-fitch.us.com keep eagle www.oakley.org.es patting. www.juicycouture.com.co Or www.jimmy-chooshoes.com a nike.shoesoutlet.us.com dozen people www.true-religion.com.co sitting www.airmax-2015.org in www.bottega-veneta.us.com a www.tommy-hilfiger.com.de circle, www.michaelkors.so do www.nike-maxfr.com a www.eyeglassesonline.us.com do www.coachoutlet-online.com.co Diushou www.mkoutletonline.us.com Juan www.coach-outletonline.net.co game: www.coach-factoryoutlet.net.co the www.pandora-charms-canada.ca hands www.tommy-hilfigeroutlet.com of www.valentino-shoesoutlet.us.com only www.nikeshoesoutlet.org.uk one www.oakleysunglasses-cheap.in.net person www.ralphlauren-polos.co.uk to www.nike--freerun.co.uk take www.gucci-shoes.net the handkerchief www.ferragamoshoes.in.net out www.uggs.in.net of www.longchamp.com.co his www.celine-bags.org mouth www.canadagooses-2016.com in www.coachoutletstore.net.co a www.nikerosherun.us circle www.vans-schuhe.com.de singing www.michael-kors-australia.com.au Diushou www.designerhandbagsoutlet.net.co Juan www.ugg-boots-australia.com.au songs, www.polo-ralph-lauren.de danced www.burberryoutlet2016.us.com around www.harrods-london.co.uk the www.tiffanyand-co.net.co circle www.oakley--sunglasses.com.au turning www.newbalance-outlet.org quietly www.converse.net.co throw www.oakley-sunglasses-canada.ca the www.ralph-laurenoutlet.ca handkerchief www.michaeljordan.com.de in www.hogan.com.de the back www.hermes-outlet.com.co of www.abercrombie-hollister.nl a www.truereligionjeans.net.co person. airmax.misblackfriday.com Then www.nikemercurial.in.net run www.swarovski--uk.me.uk around www.uhren-shop.com.de in www.pandorajewelry.top circles. www.lululemon-australia.com.au If www.nike-free-run.de you www.adidasshoes.top have a lap www.nike-schuhe.com.de behind www.new-balance-schuhe.de the www.michaelkors.co.nl handkerchief www.chi-flatiron.us.com patting, www.nike-tnrequinpascher.fr this www.burberryonlineshop.de people www.tnf-jackets.us.com have www.cheaprayban.com.co not www.ghdhair-straighteners.co.uk found www.nikefree-run.org.uk the www.reebok.com.de person www.giuseppe-zanotti.net you www.hermesbags.jp.net want www.tommy-hilfiger.co.nl to www.tiffany-andco.us.com give www.cheapjerseys.com.co a www.christianlouboutinshoes.jp.net performance www.ralphlaurenoutlet-online.us.com for www.weddingdressesuk.org.uk everyone; www.ralphslauren-outlet.co.uk a www.omega-watches.us.com joke, www.burberry2016.co.uk sing www.air-huarache.co.uk songs, www.converse-shoes.net or www.nike-roshe-run.de back www.pandora-charms.org.uk poem. Then www.pumashoes.in.net began www.hollister-clothing.in.net Diushou www.rolexwatchesforsale.us.com Juan www.mcmbags.net by www.guccishoes.in.net him or www.yoga-pants.net.co her. www.timberlandbootsoutlet.us.com If www.handbagsoutlet.net.co this is www.tomsoutletonline.net discovered www.thenorth-faces.co.uk immediately www.montres-pascher.fr took www.ugg-boots.ca the www.michaelkors-outlet-online.com.co handkerchief www.michael-kors.com.es catch www.burberrys-outlet2016.com Diushou www.michael--kors.us.com Juan people, www.nike-airmaxinc.co.uk that www.rayban-sunglasses.us.org Diushou www.polos-ralphlauren.us.com Juan www.michael-kors.com.co will www.fashionclothes.us.com continue www.coachblackfriday.com to www.cheapshoes.com.co lose, www.michaelkors-uk.org.uk someone www.levisjeans.com.co who www.swarovski-australia.com.au can www.pumaonline-shop.de back into www.converse.com.de place; catch, www.designer-handbagsoutlet.us.com and www.timberlands-paschere.fr throw this www.rayban.org.es man www.coachoutletstore-online.com.co who www.tiffany-und-co.de has www.soccer-shoesoutlet.com sat www.ugg-bootsclearance.com on www.nike.org.es the www.raybans-sunglassesoutlet.in.net bit www.canada-goosesjackets.us.com when www.guccishoes-uk.co.uk this www.northfaceoutlet.com.co man www.nikefree-run.net will www.thenorthface.com.de be www.nikefactory.org punished www.toms--outlet.com.co performances. www.christian-louboutinshoes.com.co We www.louisvuitton-outlet.com.co will www.adidas.org.es play www.ralphlaurenoutlet.us.com along with www.salvatoreferragamo.in.net a www.ralphlaurenoutletonline.in.net dozen www.louis-vuitton-taschen.com.de "Stars www.thomas-sabo.com.de over www.rosheruns.us the www.cheap-raybans.com month www.uggsoutlet.com.co child" www.ghd-hairstraightener.net or www.ralphlaurenonlineshop.de "cat www.timberlandshoes.net.co drilled www.louis-vuittonoutletcanada.ca 72 www.insanity-workout.us.com holes" www.nike-shoes-canada.ca game. www.michael-kors-handbags.us.com (Read www.oakleyoutlet.ar.com the www.longchamps.us.com article www.lululemonoutlet.gb.net Network: www.ralphlaurenoutletonline.us.org www.sanwen.net)Also uggaustralia.misblackfriday.com I www.nfl-jersey.us.com remember www.louisvuitton.so one www.uggboots.com.de summer, www.nike-air-max.com.de that www.rolex-watches.us.com the www.the-northface.net.co acquisition www.mizuno-running.net of www.converse-shoesoutlet.com medicinal www.iphone-cases.net.co city www.toms-shoes.net.co recovered www.tiffany-jewelry.net cicada skin www.toms-shoes.com.co (medical www.barbour-jacketsoutlet.com term www.salomon-schuhe.com.de called www.bcbg-dresses.com cicada), www.rayban-wayfarer.in.net catty www.eyeglassframes.in.net two www.pulseras-pandora.com.es five. www.prada.com.de So www.tommy-hilfiger-online-shop.de every www.ralph-laurens.org.uk day, www.nike-air-max.com.se together www.tommyhilfiger.net.co with www.nike-roshe-run.com.es my www.tocoachoutlet.com brothers holding www.bcbg-max-azria.ca bamboo, www.christian-louboutin-shoes.ca Dianzhe plastic www.hermesbirkin-bag.net bags, www.oakleyoutlet-online.us.com and www.the-north-face.ca from www.wedding--dresses.ca the www.coach-factoryyoutletonline.net village www.hollister.us.org in www.guccioutlet-sale.in.net the www.poloralphlaurenoutlet.net.co woods www.mcm-handbags.org to www.toms-shoesoutlet.net find www.michael-korshandbags.org.uk a www.michaelkorsoutlet.ar.com tree www.hollisteronlineshop.com.de cicada www.giuseppezanotti.com.co skin, www.longchamp-bags.us.com after www.newoutletonlinemall.com the www.michael-kors-outlet.us.org end www.swarovskijewelry.com.co of the www.coach-factory.in.net summer, www.louis--vuitton.org.uk we www.katespadeoutlet.gb.net harvest www.airjordans.us relatively www.chiflatiron.net.co big, www.abercrombie-kids.us.com full harvest www.christianlouboutin.org.uk four pounds, www.pradaoutlet.com.co to www.basketballshoes.com.co buy www.pandora.com.de ten www.replica-watches.com.co dollars. www.swarovski-crystal.us.com The www.nike-huarache.nl next www.burberry-handbags2016.in.net summer www.the-northface.com.co we www.polooutlets-store.com look www.ralph-lauren.com.au for www.cheap-nike-shoes.net a www.louisvuittons.com.co summer, www.truereligion-outlet.com.co more www.louisvuitton.jp.net than www.woolrich-clearance.com the www.tommyhilfigeroutlet.in.net first www.louis-vuitton-australia.com.au year looking www.nikefree5.net for www.christianlouboutinshoesoutlet.org even www.bebeclothing.in.net more, I www.rayban.com.de did www.adidas-superstar.de not www.replicarolex-watches.us.com expect www.pradahandbags.net.co there www.montblanc--pens.in.net to www.newbalance.com.es happily www.louis-vuittonblackfriday.com after being www.hollister-abercrombie.com.se told www.adidas-schuhe-online.de not www.longchamphandbagsoutlet.net recovered. www.oakley.com.de Cicada www.abercrombie-fitchs.us.com got www.oakley-outletstore.in.net hard www.michaelkorsbags.us.org skin, www.retro-jordans.com back www.oakleys-glasses.us.com at www.ugg-boots.us.org home www.rosherun.org.uk after www.toryburch-sandals.in.net shuffling, www.longchamp.com.de and www.chanel-bags.com.co

www.truereligion-outlet.us.org

Comment by zyf543 6 weeks and 5 days ago

http://www.christianlouboutin.in.net

http://www.airjordanretro.uk

http://www.oakleyglasses.com.co

http://www.mlbjerseysauthentic.in.net

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

http://www.ugg.name

http://www.mlbjerseyscheap.in.net

http://www.tiffanyand.co.uk

http://www.cheapralphlauren.in.net

http://www.michaelkorshandbagsoutlet.eu.com

http://www.huaracheshoes.uk

http://www.michaelkorsoutletstoreonline.com.co

http://www.toms-outletstore.us.com

http://www.fitflopsoutlet.in.net

http://www.jordansforcheap.us.com

http://www.cheapretro-jordans.com

http://www.zoomkb24.com

http://www.oakleysunglassescheap-sale.com

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

http://www.nfljerseyscheap.in.net

http://www.cheapbasketballshoes.us.com

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

http://www.tomsoutletstore.us.com

http://www.jordanretro.uk

http://www.jewelrytiffanyand.co

http://www.cheapairjordan.us

http://www.cheapairjordan.in.net

http://www.chromehearts.in.net

http://www.adidasnmd.uk

http://www.kobebasketballshoes.net

http://www.minireplicahut.com

http://www.outletmichaelkorsinc.com

http://www.11jordanshoes.com

http://www.oakleysunglassesoutlet.us

http://www.uggoutlet.uk

http://www.michaeljordanshoes.us.com

http://www.cheapnfljerseysonlinestore.com

http://www.oakley-sunglassescheapsale.com

http://www.tomsoutletstore.name

http://www.adidasnmd.com.co

http://www.michaelkors-handbags.net

http://www.huarachesshoes.uk

http://www.raybansunglass.uk

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

http://www.michaelkorspurse.com.co

http://www.michaelkorsonline.net

http://www.michaelkorshandbagsclearance.com.co

http://www.airhuaraches.org.uk

http://www.michaeljordanshoes.net

http://www.michaelkorsoutletsfactory.us.com

http://www.mlbjerseyswholesale.in.net

http://www.oakleyvault.com.co

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

http://www.michaelkorshandbags.net

http://www.nfljerseyswholesale.in.net

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

http://www.oakleysunglassescheapssale.com

http://www.2016michaelkorsoutlet.us.com

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

http://www.outlettiffanyandco.us.com

http://www.outlettiffanyand.co

http://www.truereligiononsale.in.net

http://www.raybansunglass.us

http://www.oakleysunglasses-cheapsale.com

http://www.louis-vuittonhandbags.net

http://www.cheaptiffanyandco.in.net

http://www.oakley-sunglasses.co

http://www.airhuarache.uk

http://www.kobeshoes.uk

http://www.outletmichaelkors.com.co

http://www.fitflops.cc

http://www.jewellerytiffanyand.co

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

http://www.michaelkorsonline.name

http://www.cheaptruereligionjeans.us

http://www.fitflopssandals.net

http://www.cheapralphlaurenonline.uk

http://www.chromehearts.com.co

http://www.outletonlinemichaelkors.us.org

http://www.authenticjordanscheap.us.com

http://www.kobesneakers.com

http://www.huarachesshoes.co.uk

http://www.michaelkorsoutletonline.uk

http://www.nfljerseys2015.in.net

http://www.chinajerseyssaleonline.com

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

http://www.fitflops.com.co

http://www.raybansunglassesoutlet.org

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

http://www.cheapairjordan.uk

http://www.tiffany.net.co

http://www.zoomkb24.uk

http://www.raybanglasses.in.net

http://www.oakleystoreonline.us.org

http://www.cheapnfljerseysstorechina.com

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

http://www.tiffanyandcouk.uk

http://www.rayban-sunglasses.uk

http://www.michael-kors-handbags.com.co

http://www.tiffanyandcojewellery.us.com

http://www.fitflopsoutlet.uk

http://www.cheapauthenticjordans.us.com

http://www.oakleyoutlet-store.com

http://www.oakleysunglassescheapsales.com

http://www.airjordan.cc

http://www.christian-louboutin-outlet.uk

http://www.nikedunks.us.org

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

http://www.tiffanyandcooutletonline.us.com

http://www.cheaprealjordans.us.com

http://www.cheaprolexwatchesonline.in.net

http://www.nmdadidas.us.com

http://www.kobebasketballshoes.us.com

http://www.oakley-sunglass.in.net

http://www.oakleyssunglassescheapsale.com

http://www.cheap-jordanshoessale.com

http://www.michaelkorsoutletin.net

http://www.chromeheartsonline.us.com

Comment by sanjunn 1 day ago

Your point of view

You must be signed in to comment.