List 50 largest source files in a project

find . -type f -name '*.pm' -printf '%6s %p\n' | sort -nr | head -n 50
Will work with filenames with spaces inside. Will not break in case of someone making directory that matches *.pm. And sorts from largest. Where largest is file size, not line count.

0
By: depesz
2011-02-09 16:19:11

What Others Think

he following 50 source code repository hosts are listed in no particular order. ... It's been around longer than many of the other hosts on this list and is ... Open source projects for Linux, Windows, and Mac are typically hosted on ... and commits; Save time when searching changesets, files, and code. by http://epicfollowers.co.uk/
followerscanda · 18 weeks and 6 days ago
Start at home. Tell that person you love them. Dance at a wedding. Take risks. Be respectfully weird. (That probably means, be you.) Then try it at ... by https://followersuk.uk/
buyfollowersuk · 18 weeks and 6 days ago
5 Powerful Mindset Shifts to Stop Worrying About What Other People Think · 1. Know your values. · 2. Know to stay in your own business. · 3. Know that you have ... http://buyfollowersitaly.com/
followerscanda9 · 18 weeks and 6 days ago
Booktopia - buy online books, DVDs and Magazine Subscriptions from Australia's leading online bookstore with over 4 million titles. Booktopia offers thousands ... http://buyfollowersaustralia.com.au/
followerscanda9 · 18 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands



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: