Perhaps I'm missing something, but won't that only find large individual files? What if a directory (or subtree) has a very large number of small to medium-sized files? (e.g. someone's music or photo collection). The docs I've found for find's -size option refer to file size, no discussion of behavior with directories.

My goal here is to quickly find what's consuming the disk space, and in my experience, it's not usually huge individual files.

-- Paul

Eric Blake wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Paul Chambers on 1/14/2009 3:54 PM:
I'd like to submit the attached small patch for du. it adds a
'--min-size' option, which can be used to filter the output to only
include items of that size or greater.

It seems like find(1) might be a better tool for this.  It has the
advantage of already being standardized, so you wouldn't be relying on a
non-portable extension.  For example, this is the POSIX-mandated way to
find all files that are at least a mebibyte in size:

find . -size $(( 1024 * 1024 ))c

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to