
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tlug] Command to find directories containing a particular size of data
- Date: Sun, 03 Apr 2011 12:31:54 +0900
- From: Dave M G <dave@example.com>
- Subject: [tlug] Command to find directories containing a particular size of data
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8
TLUG,
With this command I can find out the data size of the subdirectories in
the specified folder:
du -sh /directory/*
With this next command, I can search a whole directory tree for
individual files of 10MB or more:
find /directory -size +10000k
However, what I'd really like is a sort of combination of the two. I
want to crawl through a whole directory tree, and find the directories
that contain 10MB or more of files.
When calculating the size of any one directory, I need to know just the
total size of *files* in that directory, but not including the sizes of
subdirectories in that total.
In other words, what I'm trying to find are instances where a specific
directory contains a zillion tiny files that add up to 10MB or more.
Is there a way to do that?
I hope my question is clear. Thanks for any advice.
--
Dave M G
Home |
Main Index |
Thread Index