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



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

Home Page Mailing List Linux and Japan TLUG Members Links