Created
April 16, 2012 22:23
-
-
Save ryangreenberg/2402054 to your computer and use it in GitHub Desktop.
Find the longest file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f | # find all normal files | |
grep -v "\.log$" | # skip files ending with .log | |
xargs wc -l | # run wc -l on each file | |
sort -r # sort descending |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment