[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] 100 Largest Files



2008/5/18 Mel Wade <mel melwade com>:
> Is there a way to scan a hard drive and list the 100 largest files using the
> command line in Linux?

find / -mount  -type f -print0|xargs -0 du -s >/root/$$.sort;sort -n
/root/$$.sort|tail -n 100

(-mount keeps it from searching /proc and the like)

This is piped to a temporary file because xargs will cut the filename
list into 128 KB chunks.

calvin


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]