Logo 
Search:

Unix / Linux / Ubuntu Answers

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds
  on Dec 26 In Unix / Linux / Ubuntu Category.

  
Question Answered By: Adah Miller   on Dec 26

No problem.

I just thought of a way to get the results I like in a one liner, here it is:

find . -exec ls -ld {} \; | grep -v ^d | sort -n -r --key=5 | less

Of course, you could also redirect the output to a log file:

find . -exec ls -ld {} \; | grep -v ^d | sort -n -r --key=5 > /tmp/log_file

It's slower than the perl solution, but having thought of both, it is
cooler. I think that I'm going to refine the perl script a bit and add
something like a progress bar so that you can see that it's still
running, and make it more robust. It's something I want to keep
around. OTOH, if I still worked as an admin, I'd save the one-liner in
my Palm Pilot so that I could type it in whenever iI needed it.

Share: 

 

This Question has 14 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Finding largest file Or get search suggestion and latest updates.


Tagged: