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

Recursively find top 20 largest files (> 1MB) sort human readable format

Terminal - Recursively find top 20 largest files (> 1MB) sort human readable format
find . -type f -print0 | xargs -0 du -h | sort -hr | head -20
2012-03-30 10:21:12
User: flatcap
Functions: du find head sort xargs
9
Recursively find top 20 largest files (> 1MB) sort human readable format

Search for files and list the 20 largest.

find . -type f

gives us a list of file, recursively, starting from here (.)

-print0 | xargs -0 du -h

separate the names of files with NULL characters, so we're not confused by spaces

then xargs run the du command to find their size (in human-readable form -- 64M not 64123456)

| sort -hr

use sort to arrange the list in size order. sort -h knows that 1M is bigger than 9K

| head -20

finally only select the top twenty out of the list

Alternatives

There is 1 alternative - vote for the best!

Terminal - Alternatives
find . -mount -type f -printf "%k %p\n" | sort -rg | cut -d \ -f 2- | xargs -I {} du -sh {} | less

Know a better way?

If you can do better, submit your command here.

What others think

Too new for my system :o

sort -hr

sort: invalid option -- 'h'

Try `sort --help' for more information.

Comment by bashrc 251 weeks and 1 day ago

@bashrc: Really? Sorry, it's been in Gnu sort since 2009 (v7.5).

Comment by flatcap 251 weeks ago

@flatcap: On RedHat/CentOS 5 this doesn't work.

Comment by Doskias 34 weeks and 1 day ago

Within the You actually.Ersus., florida sales tax is a good deal additional unreliable. No show up until finally you happen to be waiting for the particular examine if it's only greater for the expenditure fee.Are you actually aware precisely what is build amongst the"parfum". this "eau a parfum" and most of the "eau delaware toilette"? Initial using the smell is costly. Its content has 30-40 per-cent in the excellent stinking natural oils and as a consequence possess the best as well as concentrated aroma, also, since within the high emphasis the actual plenty of to make use of one simple and then for Two declines. The aroma travels in your with regard to 6-9 an extended while. It is far better in order to so as to because evening hours perfume.Unlike various other porcelain wrist watches that happen to be very priced, that MK watch assortment is very relatively costed along http://www.hermesbeltsbirkinkellybag.co.uk/ with likes originate from about $200 as well as ascend to help $600. Within my particular person opinion, this is a sizeable anticipate most of these designer watches contemplating their high quality along with the luxury tag linked to them. This kind of cost-effective price tag choice is the one other the explanation why his wrist watches are very preferred everywhere you go while an increasing number of people could enjoy the beauty of those designer watches.It seemed to realize why Manufacturing unit Store provides really obtained this kind of famous title along with the reason why he'll constantly end up being among the major U . s . developers in recent history.Perfume is truly one of those ideas, including precious stone companies along with the room cost at a Tahitian vacation resort, that simply isn't going to carry on income. The majority of qualified girls associated with odor can let you know of which perfume rates are steady because Natural stone regarding Gibraltar. The best selection you'll receive coming from several aroma organizations is some style of packaged selection on the trips or for Mothers Evening.I received that will come across when it concerns Movies by Yves St. Laurent. My partner and i suched as the scent totally when I widely used the particular cardstock ethusist remove however have already been lots of a few other perfumes of which felt a lot more intriguing, notable and lively. Yet after i performed any "test" involving wearing Motion pictures for an mid-day, My partner and i checked out my spouse and i loved the particular smell.MK is really a high-end brand that has in fact acquired it's fantastic standing. Honours just like the CFDA Women's Stylist of this year within 2004, your CFDA Guys Custom of the year in 2003 and also the CFDA Life-time Good results Give this year have got really shown the vicinity exactly why the particular MK's variety is a pressure that need considering. on their own takes a leadership job from the kind of almost all goods. Perhaps that's why the manufacturer features in fact started to be able to expand and also attention a real major readers. His or her observe collection features actually retained feeling of top quality and class which will bring fans for a long time ahead.Right soon after likely to Home purchased You are able to on 17 to get all the way down his / her area in excess of Parsons, the actual very populared university of style and magnificence, he or she fallen a part within his a lot more twelve months. An amazing assortment that did not have any type of simply for stability outcomes about and even just around the corner upcoming vocation since his Fifth assortment used above June 2006. Mike geary possesses broken sturdiness to electrical succeeding quite a few cash aspirations.

Comment by stephanieg915 4 days ago

http://www.canadagoosefemmehomme2016.fr/chaussure-canada-goose_230.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-grande-taille_92.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-taille-grand-ou-petit_112.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-payer-en-plusieurs-fois_152.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-paris_354.html

http://www.canadagoosefemmehomme2016.fr/soldes-canada-goose_137.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-homme-prix_329.html

http://www.canadagoosefemmehomme2016.fr/manteau-type-canada-goose_369.html

http://www.canadagoosefemmehomme2016.fr/acheter-doudoune-canada-goose_258.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-modele-victoria_409.html

http://www.canadagoosefemmehomme2016.fr/site-officiel-canada-goose_432.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-enfant_264.html

http://www.canadagoosefemmehomme2016.fr/parka-trillium-canada-goose_333.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose_330.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-stockholm_43.html

http://www.canadagoosefemmehomme2016.fr/vetement-goose-canada_345.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-mountaineer_477.html

http://www.canadagoosefemmehomme2016.fr/parka-canada-goose-expedition_381.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-trilium_181.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-solaris_107.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-montebello-femme_373.html

http://www.canadagoosefemmehomme2016.fr/parka-expedition-canada-goose_452.html

Comment by sguerra376 2 days ago

www.canadagoosefemmehomme2016.fr/parka-canada-goose-chateau_400.html

www.canadagoosefemmehomme2016.fr/nouvelle-collection-canada-goose_451.html

www.canadagoosefemmehomme2016.fr/canada-goose-bordeaux_397.html

www.canadagoosefemmehomme2016.fr/canada-goose-chapka_342.html

www.canadagoosefemmehomme2016.fr/canada-goose-authentique_434.html

www.canadagoosefemmehomme2016.fr/canada-goose-sherbrooke_245.html

www.canadagoosefemmehomme2016.fr/canada-goose-bleu-electrique_187.html

www.canadagoosefemmehomme2016.fr/canada-goose-noir-femme_346.html

www.canadagoosefemmehomme2016.fr/canada-goose-chateau-homme_296.html

www.canadagoosefemmehomme2016.fr/canada-goose-ottawa_412.html

www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-homme_161.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-d-occasion_466.html

www.canadagoosefemmehomme2016.fr/canada-goose-outlet-france_122.html

www.canadagoosefemmehomme2016.fr/canada-goose-original_190.html

www.canadagoosefemmehomme2016.fr/prix-canada-goose-enfant_75.html

www.canadagoosefemmehomme2016.fr/prix-canada-goose_398.html

www.canadagoosefemmehomme2016.fr/prix-canada-goose-femme_206.html

www.canadagoosefemmehomme2016.fr/vente-canada-goose-montreal_160.html

www.canadagoosefemmehomme2016.fr/canada-goose-bomber_402.html

www.canadagoosefemmehomme2016.fr/skreslet-parka-canada-goose_469.html

www.canadagoosefemmehomme2016.fr/acheter-canada-goose-paris_406.html

www.canadagoosefemmehomme2016.fr/canada-goose-solaris-parka_375.html

www.canadagoosefemmehomme2016.fr/canada-goose-summit_236.html

www.canadagoosefemmehomme2016.fr/vente-canada-goose_194.html

www.canadagoosefemmehomme2016.fr/canada-goose-pbi_252.html

www.canadagoosefemmehomme2016.fr/chilliwack-bomber-canada-goose_372.html

Comment by sguerra376 2 days ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-blanche_295.html

http://www.canadagoosefemmehomme2016.fr/yorkville-canada-goose_463.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-ca_288.html

http://www.canadagoosefemmehomme2016.fr/kensington-parka-canada-goose_257.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-doudoune-sans-manche_166.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-xxs_391.html

http://www.canadagoosefemmehomme2016.fr/gilet-canada-goose_185.html

http://www.canadagoosefemmehomme2016.fr/kensington-canada-goose_234.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-parka-homme_339.html

http://www.canadagoosefemmehomme2016.fr/doudoune-style-canada-goose_283.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-solde_457.html

http://www.canadagoosefemmehomme2016.fr/manteau-comme-canada-goose_226.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-entrepot_141.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-borden-bomber_196.html

http://www.canadagoosefemmehomme2016.fr/vetements-canada-goose_64.html

http://www.canadagoosefemmehomme2016.fr/revendeur-canada-goose-france_401.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose_330.html

http://www.canadagoosefemmehomme2016.fr/ou-acheter-une-doudoune-canada-goose_348.html

http://www.canadagoosefemmehomme2016.fr/veste-canada-goose-femmes_189.html

http://www.canadagoosefemmehomme2016.fr/marque-doudoune-canada-goose_74.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-homme-prix_329.html

Comment by sguerra376 1 day ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-doudoune_163.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-milan_99.html

http://www.canadagoosefemmehomme2016.fr/prix-canada-goose-enfant_75.html

http://www.canadagoosefemmehomme2016.fr/parka-canada-goose-langford_425.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-en-france_127.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-snow-mantra-parka_479.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-summit_236.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-aviateur_449.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-laval_347.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-chilliwack_113.html

http://www.canadagoosefemmehomme2016.fr/acheter-canada-goose_446.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-blouson-aviateur-chilliwack-homme_321.html

http://www.canadagoosefemmehomme2016.fr/rideau-canada-goose_303.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-grande-taille_92.html

http://www.canadagoosefemmehomme2016.fr/prix-canada-goose-new-york_215.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-femme_191.html

http://www.canadagoosefemmehomme2016.fr/parka-canada-goose-chateau_400.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-promo_172.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-langford-parka_444.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-citadel_470.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-bleu-electrique_187.html

http://www.canadagoosefemmehomme2016.fr/parka-banff-canada-goose_417.html

http://www.canadagoosefemmehomme2016.fr/doudoune-homme-canada-goose-pas-cher_204.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-parajumpers_49.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-paris_354.html

Comment by sguerra376 1 day ago

www.canadagoosefemmehomme2016.fr/canada-goose-stockholm_43.html

www.canadagoosefemmehomme2016.fr/canada-goose-original_190.html

www.canadagoosefemmehomme2016.fr/canada-goose-grise-femme_269.html

www.canadagoosefemmehomme2016.fr/canada-goose-victoria-pas-cher_211.html

www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-femme_305.html

www.canadagoosefemmehomme2016.fr/canada-goose-dawson-parka_374.html

www.canadagoosefemmehomme2016.fr/whistler-parka-canada-goose_309.html

www.canadagoosefemmehomme2016.fr/canada-goose-mystique-femme_179.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-chilliwack-femme_473.html

www.canadagoosefemmehomme2016.fr/canada-goose-rennes_423.html

www.canadagoosefemmehomme2016.fr/canada-goose-achat_221.html

www.canadagoosefemmehomme2016.fr/marque-doudoune-canada-goose_74.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-femme-occasion_164.html

www.canadagoosefemmehomme2016.fr/canada-goose-manteau_438.html

www.canadagoosefemmehomme2016.fr/canada-goose-accessoires_183.html

www.canadagoosefemmehomme2016.fr/fourrure-canada-goose_70.html

www.canadagoosefemmehomme2016.fr/blouson-goose-canada_195.html

www.canadagoosefemmehomme2016.fr/victoria-parka-canada-goose_338.html

www.canadagoosefemmehomme2016.fr/parka-canada-goose-pas-cher_358.html

www.canadagoosefemmehomme2016.fr/canada-goose-site-officiel_57.html

www.canadagoosefemmehomme2016.fr/achat-canada-goose-en-ligne_153.html

www.canadagoosefemmehomme2016.fr/pas-cher-canadian-goose_219.html

Comment by sguerra376 12 hours ago

www.canadagoosefemmehomme2016.fr/adresse-magasin-canada-goose-montreal_297.html

www.canadagoosefemmehomme2016.fr/canada-goose-langford_320.html

www.canadagoosefemmehomme2016.fr/entrepot-canada-goose_158.html

www.canadagoosefemmehomme2016.fr/canada-goose-original_190.html

www.canadagoosefemmehomme2016.fr/canada-goose-couleur_471.html

www.canadagoosefemmehomme2016.fr/canada-goose-pbi-chilliwack-bomber_73.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-bomber-pas-cher_465.html

www.canadagoosefemmehomme2016.fr/trillium-parka-canada-goose_108.html

www.canadagoosefemmehomme2016.fr/canada-goose-quebec_125.html

www.canadagoosefemmehomme2016.fr/vetements-canada-goose_64.html

www.canadagoosefemmehomme2016.fr/canada-goose-femme-solde_457.html

www.canadagoosefemmehomme2016.fr/parka-canada-goose-langford_425.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-site-officiel_188.html

www.canadagoosefemmehomme2016.fr/veste-canada-goose-femmes_189.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-femme_68.html

www.canadagoosefemmehomme2016.fr/canada-goose-au-canada-prix_54.html

www.canadagoosefemmehomme2016.fr/magasin-canada-goose-france_216.html

www.canadagoosefemmehomme2016.fr/boutique-canada-goose-montreal_456.html

www.canadagoosefemmehomme2016.fr/canada-goose-pour-enfant_217.html

www.canadagoosefemmehomme2016.fr/mystique-parka-canada-goose_229.html

www.canadagoosefemmehomme2016.fr/site-canada-goose_352.html

www.canadagoosefemmehomme2016.fr/parka-canada-goose-montebello_214.html

www.canadagoosefemmehomme2016.fr/canada-goose-parka-montebello_317.html

Comment by sguerra376 8 hours ago

Your point of view

You must be signed in to comment.