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

batch crop images whit imagemagik

Terminal - batch crop images whit imagemagik
for k in *.png; do convert $k -crop <width>x<high>+<cropwidth>+<cropthigh> <newpath>/$k; done
2011-11-14 17:04:15
User: mrehqe
-2
batch crop images whit imagemagik

Crop several images by imagemagik's convert command. substitute , ,, with pixel value and with a different existent directory.

Alternatives

There are 2 alternatives - vote for the best!

Terminal - Alternatives
mogrify -crop <width>x<height>+<X-offset>+<Y-offset> *.png
2013-01-24 11:42:48
User: michelsberg
2

Just starting to get in love with mogrify.

Know a better way?

If you can do better, submit your command here.

What others think

There's no need to spawn a subshell for the file list:

for k in *.png; do ...; done
Comment by syngin 297 weeks and 3 days ago

Oh lord don't parse ls.

Comment by kaedenn 297 weeks and 2 days ago

fixed, tnx.

Comment by mrehqe 297 weeks ago

kind http://ralphlauren.blackfriday.in.net/ decor, http://falcons.nfljersey.us.com/ kind http://www.cheap-baseballbats.us/ of http://www.ugg-bootsclearance.com/ anesthetic is http://www.swarovskijewelrys.in.net/ used http://www.burberry-handbagsoutlet.net.co/ to http://www.omegawatches.in.net/ deceive http://www.hermes-bags.net/ others; http://www.adidas.us.com/ the http://www.burberrys-outlets.org.uk/ face http://www.tnf-jackets.us.com/ of http://www.philipp-plein.us.com/ kindness, http://www.oakley--sunglasses.com.au/ they http://www.cheap-jordans.net/ laughing incessantly.In http://www.chi-flatiron.us.com/ the http://www.mizuno-running.net/ eyes of http://www.nike-rosheruns.nl/ caring people, http://www.chiflatiron.net.co/ kindness http://www.iphone-cases.net/ is http://www.cheap-rayban.com.co/ the http://buccaneers.nfljersey.us.com/ nature of http://www.uggs-onsale.net/ pure http://www.pandorajewelry.top/ beauty, all http://www.ralph-laurenoutletonline.com/ hypocrisy, http://www.mcm-handbags.org/ cold, numb before http://bucks.nba-jersey.com/ it http://www.rayban-pascher.fr/ will http://www.cheap-thomassabos.co.uk/ back http://www.adidasshoesca.ca/ away http://www.designerhandbagsoutlet.net.co/ any stubborn http://www.nikefree5.net/ ugly http://www.tory-burchoutlet.com.co/ can http://colts.nfljersey.us.com/ only be http://www.scarpe-hoganoutlets.it/ good http://www.tommyhilfigerca.ca/ for http://www.pandorajewellery.com.au/ the http://www.uggs-boots.net.co/ teeth http://www.abercrombie-and-fitch.us.com/ in http://warriors.nba-jersey.com/ a http://www.nikeair--max.fr/ dark corner. http://heat.nba-jersey.com/ Goodness, it was http://www.ed-hardy.us.com/ an http://www.bottega-venetas.cc/ extremely http://www.christianlouboutinshoesoutlet.org/ hot in http://www.canadagooses-jackets.com/ the http://www.longchamp.com.co/ cool http://www.ray-bans.co.uk/ wind, http://oakley.blackfriday.in.net/ it http://www.zxcoachoutlet.com/ is http://www.montblancpens-sale.com/ cold http://lakers.nba-jersey.com/ in the warmth http://www.tommy-hilfigers.com/ of http://pistons.nba-jersey.com/ a http://www.reebok.com.de/ fire, http://wizards.nba-jersey.com/ it is http://www.uggs-online.com/ lean http://www.michaeljordan.com.de/ people http://www.beatsbydre.com.co/ quietly http://www.nfljersey.us.com/ sent http://www.uggs.co.nl/ a http://www.air-huaracheshoes.co.uk/ load http://www.adidas-shoes.cc/ of http://www.vibram-fivefingers.in.net/ food, http://www.burberryoutlet-sale.net/ it http://www.the-northfacejackets.co.uk/ is http://www.iphone-cases.in.net/ the http://spurs.nba-jersey.com/ drought http://www.polos-ralphlauren.us.org/ of http://www.pandora.com.de/ rain http://www.soft-ballbats.com/ fell from http://www.toms-outlets.us.com/ the sky, http://www.newbalance-shoes.org/ it http://www.horlogesrolex.nl/ is http://www.burberryoutlets.net.co/ your weight uphill http://www.longchamp-handbagsoutlet.us.com/ when http://magic.nba-jersey.com/ the http://www.michaelkors-outletonline.cc/ back http://www.converse.com.de/ of http://www.michaelkorsoutletonline.net.co/ the http://www.armani-exchange.in.net/ promoter, which http://www.replica-handbags.net.co/ is http://www.oakley-outlet.net.co/ stretched over http://www.nikefree-run.net/ a cliff http://www.coach-outletonline.ca/ when http://www.poloralphlauren.cc/ you http://www.truereligion-outlet.us.org/ fall http://www.swarovski-australia.com.au/ fast http://www.ray-banssunglasses.co.uk/ cable, http://www.michael-korsbags.org.uk/ it http://www.burberryoutlet-sale.com.co/ is http://www.toms-outlet.net/ not destitute http://www.ralph-laurenspolo.co.uk/ when http://www.uggsstore.us.com/ you signed http://www.ralphlauren-au.com/ a http://www.the-northfacejackets.net.co/ remittance, http://www.poloralphlaurenoutlet.net.co/ it is http://hornets.nba-jersey.com/ a word http://www.hollisterclothingstore.org/ of http://www.ralphs-laurens.co.uk/ advice when http://www.true-religions.com/ you http://www.uhren-shop.com.de/ are http://www.air-maxschoenen.nl/ wealthy, http://www.raybans-sunglass.com/ it http://www.mbt-shoes.us.com/ is http://www.nikefreeshoes-inc.co.uk/ when you're http://www.insanity-workout.us.com/ down http://www.valentino-shoesoutlet.us/ a http://www.christianlouboutin.org.uk/ few sincere http://bills.nfljersey.us.com/ consolation, http://www.michael-kors-taschen.com.de/ it http://www.coachblackfriday.com/ is http://www.truereligions.net/ when you http://www.oakleys.org.es/ proud bunch http://www.rayban-pas-cher.fr/ of http://www.oakley.com.de/ impolite words ...... http://www.mcm-bags.us.org/ even, http://www.cheap-nike-shoes.net/ it's http://www.rayban.co.nl/ just http://www.nikeshoesoutlet.org.uk/ a genuine http://www.michael-korssale.us.com/ faint http://bulls.nba-jersey.com/ smile. http://www.michael-kors.com.es/ Goodness http://www.cheapjerseys.us.org/ of http://www.pulseraspandora.com.es/ my heart, http://www.raybans.org.es/ like http://www.bcbg-dresses.com/ the http://vikings.nfljersey.us.com/ foot http://panthers.nfljersey.us.com/ of http://www.tommy-hilfiger.in.net/ the http://www.longchamps.us.com/ snow-capped http://www.airmax-2015.org/ mountains http://kings.nba-jersey.com/ trickle, http://www.mk-outletonline.us/ every http://www.tommy-hilfiger.co.nl/ drop http://www.cheap-michaelkors.in.net/ of http://www.longchampoutlet.com.co/ holy http://www.jordanretro.org/ pure http://www.adidas-superstars.nl/ polymer of http://www.hogan.com.de/ snow. Together http://www.oakley-outletonline.com.co/ into http://www.michaelkors-bags.com.co/ a http://www.womenclothes.in.net/ kind http://seahawks.nfljersey.us.com/ of river water, http://rams.nfljersey.us.com/ singing http://titans.nfljersey.us.com/ all http://www.ghdhairstraightener.cc/ the way, http://www.burberrys-bags.net.co/ cleaned http://lions.nfljersey.us.com/ up http://saints.nfljersey.us.com/ along http://www.thenorth-face.ca/ the dirty, http://www.timberlandbootsoutlet.us.com/ rotten, http://www.ralph-laurenoutletonline.in.net/ dust, http://www.hollisters-canada.ca/ confidently http://www.juicycouture.com.co/ into rivers and the http://www.oakleys-outlet.it/ sea http://www.rayban.com.de/ life. http://jazz.nba-jersey.com/ -Good http://www.jordanrelease-dates.us.com/ is http://www.nikestore.us/ a http://76ers.nba-jersey.com/ spiritual http://www.polo-ralph-lauren.de/ force, http://www.fendi-outlet.in.net/ a http://www.nike-air-max.com.de/ spirit http://www.cheap-michaelkors.com/ of http://www.toms--outlet.com.co/ peace, http://www.retro-jordans.com/ is a http://www.burberry-outletonline.cc/ pleasure, is http://www.lauren-ralphsoutlet.co.uk/ a http://www.giuseppezanotti.com.co/ sense http://www.salvatoreferragamo.in.net/ of http://www.christianlouboutinoutlet.net.co/ optimism. http://coachoutlet.euro-us.net/ It http://www.outlet-burberry.net.co/ is a http://www.nike-skor.com.se/ calm http://www.vans-shoes.co.uk/ understanding, http://www.to-coachoutlet.com/ kind http://www.mcmhandbags.com.co/ of http://www.toms-shoe.us.com/ the http://www.monclerjackets.in.net/ mind http://www.swarovskissale.co.uk/ love, people's http://www.levisjeans.com.co/ broad http://www.polos-outlets.com/ vision. http://www.raybanoutlet.ca/ Good http://coach-outlet.tumblr.com/ will http://www.babylisspros.in.net/ teach http://www.prada-handbags.net.co/ gives the http://www.puma-shoesoutlet.com/ dedication, http://www.michael-kors-outlet.us.org/ understanding, tolerance, http://www.nfl-jersey.us.org/ pure. http://www.bottega-veneta.in.net/ Know how good people http://www.dsquared2.us.com/ are http://www.michaelkors.com.se/ noble http://www.calvin-kleins.net/ and http://www.canadagoosesonline.com/ mature, http://www.michael-kors.net.co/ you http://pacers.nba-jersey.com/ can http://www.nba-jersey.com/ always http://www.thenorthface.com.de/ keep http://www.prada-shoes.com.co/ a good http://www.rolexwatchesforsale.us.com/ mood.Kindness is http://www.michaelkors.co.nl/ a http://www.raybans-outlet.com.co/ bridge http://www.thomas-sabo.com.de/ of http://www.airjordans.us/ friendship. http://www.ferragamo.com.co/ Good http://www.cheap-raybansoutlet.in.net/ people have an http://www.the-northfaces.us.com/ understanding of other http://www.michaelkors.so/ people's hearts, http://www.tommy-hilfiger-online.de/ people http://www.abercrombie-kid.us.com/ can http://www.barbour-factory.com/ communicate http://www.beats-by-dre.com.co/ with http://www.cheap-mlbjerseys.us.com/ each http://www.nba-shoes.com/ other through http://www.coach-outletonline.net.co/ equal http://www.ferragamoshoes.in.net/ and http://www.abercrombiefitchs.cc/ open http://www.toryburchsale.com.co/ the http://www.burberry-outletcanada.ca/ mind http://www.marc-jacobs.us.com/ misunderstanding, http://rayban.blackfriday.in.net/ narrow http://azcardinals.nfljersey.us.com/ the distance between http://giants.nfljersey.us.com/ each other's http://www.asics-shoesoutlet.com/ heart, http://cowboys.nfljersey.us.com/ eliminating http://www.supra-shoes.org/ barriers, http://www.nike-schuhe.com.de/ clearing http://packers.nfljersey.us.com/ the http://www.longchamp-bags.us.com/ way http://www.versaceoutlet.us.com/ to http://www.nike-free-run.de/ compassion. Goodness http://www.hermesbirkin-outlet.com/ only http://www.michaelkorsoutlet-online.ar.com/ happiness, http://www.asicsoutlet.us.org/ good http://www.ralph-laurenpolosoutlet.com/ to http://www.barbour-jackets.us.com/ get along http://www.hollister-clothing.in.net/ with http://www.oakleyoutlet.ar.com/ each other happily http://www.truereligion-outlet.com.co/ peaceful, kind http://eagles.nfljersey.us.com/ of http://www.cheapuggs-boots.com.co/ to http://www.thenorthfacejackets.fr/ get http://www.raybans-outlet.cc/ rid http://www.nike-factorys.us/ of http://www.air-max.com.de/ endless http://www.hollisters.us.com/ battles http://trailblazers.nba-jersey.com/ and http://ravens.nfljersey.us.com/ self-consumption, http://pelicans.nba-jersey.com/ in order http://www.co-aol.com/ to http://www.timberlands-paschere.fr/ achieve good http://michaelkors.euro-us.net/ health, http://www.burberryonlineshop.de/ at http://www.tracksuits-store.com/ least http://michaelkors.misblackfriday.com/ the http://timberwolves.nba-jersey.com/ situation http://www.nike-schoenen.co.nl/ is http://www.oakleys.in.net/ normal, http://www.soccers-shoes.net/ good http://www.michael-korsbags.co.uk/ to peace and http://www.mcmbackpacks.in.net/ harmony.A good-hearted, http://www.oakleys-sunglasses.in.net/ it http://broncos.nfljersey.us.com/ is http://www.nhl-jerseys.us.com/ worth http://jets.nfljersey.us.com/ a http://www.barbours.us.com/ temple. http://www.burberrybags-sale.net/ Good http://www.the-northface.com.co/ no http://mavericks.nba-jersey.com/ means http://www.uggboots.com.de/ an optional http://www.michael-kors-australia.com.au/ gorgeous http://www.nike-outlet.us.org/ clothes, http://longchamp.blackfriday.in.net/ but http://www.christian-louboutinshoes.in.net/ everyone http://www.givenchy.in.net/ must http://www.christianlouboutinshoes.jp.net/ be http://rockets.nba-jersey.com/ the http://www.ok-em.com/ soul of http://www.abercrombiehollister.nl/ the box http://www.northfaceoutlet.com.co/ inlaid http://texans.nfljersey.us.com/ diamond, http://www.nikeairmaxnc.co.uk/ at every http://www.burberry-handbagssale.com.co/ moment http://chargers.nfljersey.us.com/ can http://knicks.nba-jersey.com/ be http://celine.blackfriday.in.net/ triumphant http://www.tommy-hilfiger.com.de/ light. http://www.ray-bansoutlet.it/ Hugo http://www.ugg-boots.us.org/ said http://www.nikerosherun.us/ the http://www.newbalanceshoes.com.es/ good: http://www.mk-com.com/ "Kindness http://www.pradaoutlet.com.co/ is the http://www.omegarelojes.es/ history http://www.cheapshoes.net.co/ of http://www.michael-kors.cc/ a http://www.omega-watches.com.co/ rare http://www.uggs-boots.com.co/ pearl, http://www.oakleys-outlet.in.net/ good people almost http://www.raybanssunglasses.in.net/ better http://www.abercrombie-andfitchs.com/ than a http://www.converse.net.co/ great http://www.kate-spades.com.co/ man." http://www.polos-outletstore.net/ American writer http://www.tory-burch.us.org/ Mark. http://www.bcbg-maxazria.ca/ Twain http://www.uggsoutlet.net.co/ said that http://www.michaelkors-canadaoutlet.ca/ good http://www.rayban-sunglasses.co/ is http://www.cheapmichaelkors.us.org/ a http://www.ugg-australia.com.de/ universal http://www.soccer-shoesoutlet.com/ language http://www.ralphlaurens-outlet.co.uk/ that http://browns.nfljersey.us.com/ enables http://www.coach-factoryyoutletonline.net/ the http://49ers.nfljersey.us.com/ blind http://www.wedding-dresses.cc/ to http://patriots.nfljersey.us.com/ "see" so http://thunder.nba-jersey.com/ deaf http://www.barbour.in.net/ "hear." Good http://www.hollister-clothingstore.com/ heart, http://www.nike-air-max.com.au/ like http://www.cheapreplica-watches.in.net/ a http://www.cheapnhljerseys.us.com/ flash, http://www.new-balance-schuhe.de/ like http://www.chrome-hearts.in.net/ gold, http://www.airyeezy.us.com/ as pure http://www.swarovski-crystals.us.com/ as http://chiefs.nfljersey.us.com/ nectar, crystal http://www.ray-bansoutlet.in.net/ clear. http://michaelkors.blackfriday.in.net/ Good http://raptors.nba-jersey.com/ mind http://www.adidassuper-star.de/ is http://www.puma-shoes.de/ broad, http://www.hollister-abercrombie.com.se/ generous, http://www.nike-max.fr/ tolerant http://www.michael-korsoutlet.cc/ of http://www.underarmour.us.com/ the http://www.ray-bans.net.co/ universe, the http://www.hugo-bossoutlet.com/ benefit http://www.jordan-shoes.com.co/ of http://coach.blackfriday.in.net/ mankind http://www.nikefree-run.org.uk/ the http://www.montres-pascher.fr/ common http://www.ralphlaurencanada.ca/ people. http://www.rolexwatches-canada.ca/ Do http://www.converse-shoes.net/ good http://airmax.misblackfriday.com/ without http://www.ralphslaurenoutlet.us.com/ asking http://www.swarovski-online-shop.de/ for anything http://www.toms-shoesoutlet.us/ people are http://www.adidas.com.se/ often http://www.oakleysunglasses-canada.ca/ able http://www.tory-burchsandals.in.net/ to http://www.christianlouboutin-shoes.ca/ obtain unexpected http://coach.misblackfriday.com/ feedback http://www.coachoutlet-online.com.co/ loop http://www.kates-spade.com/ which http://www.abercrombie-andfitch.ca/ is http://www.timberland-boots.com.co/ causal http://www.guessfatory.net/ laws http://www.ray-banssunglasses.org/ of http://www.converses-outlet.com/ nature. http://bengals.nfljersey.us.com/ Good http://www.katespadeoutlet.gb.net/ people often http://www.oakleys-2017.in.net/ for http://www.adidasshoes.org.es/ the http://jaguars.nfljersey.us.com/ benefit http://www.burberry-outletsonline.org.uk/ of http://www.coach-factoryoutlet.net.co/ others, http://www.ugg-boots-australia.com.au/ in http://www.nikestore.com.de/ essence, http://www.cheap-oakleyssunglasses.com/ is http://www.cheap-jerseys.mex.com/ the http://www.timberlandshoes.net.co/ benefit of http://www.oakleyssunglasses.in.net/ their http://www.rosheruns.us/ own. http://www.coach-factory.in.net/ "Help http://www.truereligionjeans.net.co/ others help http://www.christian-louboutins.in.net/ themselves." http://uggboots.misblackfriday.com/ This http://www.woolrich-clearance.com/ sentence http://www.the-northfaces.net.co/ is http://www.mlb-jerseys.us.com/ not http://www.nike-rosherun.com.es/ simply http://www.katespades-outlet.in.net/ retribution, http://www.pradahandbags.net.co/ but http://www.air-huarache.co.uk/ fundamental http://raiders.nfljersey.us.com/ in http://www.lacosteoutlet.us.com/ life.Life http://nets.nba-jersey.com/ with kindness http://bears.nfljersey.us.com/ and http://www.sunglasses-outlet.net/ let http://www.vans-shoes.net/ in, http://www.oakleys2016.com/ life http://www.nike-tnrequinpascher.fr/ has been http://coach.euro-us.net/ good, http://celtics.nba-jersey.com/ life http://www.handbagsoutlet.in.net/ can often http://hawks.nba-jersey.com/ be http://www.nike-shoescanada.ca/ filled http://cavaliers.nba-jersey.com/ with http://www.hollisteronlineshop.com.de/ joy; http://www.hermes-outlet.net.co/ life http://www.jimmy-choos.com/ has http://www.adidas-schuheonline.de/ been good, http://www.vans-schuhe.com.de/ happy http://www.oakleysunglasses2017.com/ life http://www.nikeshoes.org.es/ can often; life has http://www.beatsheadphone.in.net/ been http://www.long-champoutlet.com/ good, http://www.pandoras-charms.org.uk/ the soul http://www.pandoracharms-canada.ca/ can http://www.true-religion.com.co/ continue http://nuggets.nba-jersey.com/ to http://www.michaelkorsbags.us.org/ sublimation. http://www.ugg-bootscanada.ca/ Kindness http://www.oakleys-frame.net/ is the http://www.ralphlaurenonlineshop.de/ golden http://www.jimmy-chooshoes.com/ life, http://www.instylers.us.org/ goodness of http://www.nikeair-max.es/ human http://www.basketballshoes.com.co/ nature http://www.michaelkorsoutlet.ar.com/ is http://www.nike-huaraches.nl/ the most http://www.monclers-outlet.us.com/ precious http://www.cheapjerseys.net.co/ light http://www.newbalance-outlet.org/ of http://www.nike-mercurial.in.net/ life. http://www.barbour-jacketsoutlet.net/ To http://www.swarovski-canada.ca/ know http://www.p90xworkout.in.net/ the http://www.longchamp.com.de/ pain http://www.celine-bags.org/ of others, http://www.uggs-australia.com.co/ they http://www.oakleyoutlet.fr/ have their http://www.nike-air-max.com.se/ own http://www.giuseppe-zanotti.net/ conscience. http://suns.nba-jersey.com/ I http://www.uggsoutlet.com.co/ know http://www.designer-handbagsoutlet.us.com/ there http://steelers.nfljersey.us.com/ is http://www.rolex-watches.net.co/ pain there will http://redskins.nfljersey.us.com/ be http://www.nike-air-force.de/ the http://www.mcms-handbags.com/ presence http://www.nikeair-max.ca/ of benevolent; http://www.newbalancecanada.ca/ see http://www.beatsbydrdrephone.com/ someone http://www.ralphlauren-polos.com.co/ and http://www.cheap-rolex-watches.org.uk/ they have http://www.tomsoutlet-online.net/ pain http://www.toms-shoes.net.co/ will http://grizzlies.nba-jersey.com/ give http://www.cheap-jerseys.cc/ birth http://www.nike-roshe-run.de/ to http://www.tommyhilfiger.net.co/ compassion!Humanity http://www.michael-korshandbags.us.org/ bears http://www.rolex-watches.us.com/ one http://www.burberry-outletstore.net/ of http://www.nikeskoes.dk/ the http://www.nikeshoes-outlet.com/ most http://www.newoutletonlinemall.com/ flexible, http://www.marc-jacobsonsale.com/ but http://www.ralph-laurens.org.uk/ at http://www.juicycoutureoutlet.net.co/ the same http://dolphins.nfljersey.us.com/ time http://www.rosherun.co.uk/ the http://www.oakley-sunglasses.mex.com/ most http://www.prada.com.de/ powerful http://www.airmax-90.org/ feelings http://clippers.nba-jersey.com/ - good. http://www.nike-airmax.us.com/ - http://www.salomon-schuhe.com.de/ Clear wat

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

Comment by ylq 22 weeks and 2 days ago

Your point of view

You must be signed in to comment.