[PLUG] Disk space question using LVM
Paul Heinlein
heinlein at madboa.com
Fri Sep 17 11:18:01 PDT 2004
On Fri, 17 Sep 2004, Aaron Baer wrote:
>> I'd do
>>
>> du -sh /*
>
> I'm a big fan of adding --max-depth=1 that way you don't see all the
> gobldygook flying by and can track down the exact directory first to
> start your hunt..
>
> du -h --max-depth=1
Interesting. My initial inclination was to blurt out that the
following du invocations are nearly equivalent:
du -h --max-depth=1 /
du -sh /*
On review, however, I noticed some subtle but potentially significant
differences:
1. The first will return the total for / in addition to the totals for
each top-level directory.
2. Unless the -a (--all) option is given, the first will ignore
non-directories, while the second will report on anything globbed
by the shell wildcard.
3. The second is sorted alphabetically since the shell expands the
wildcard before passing the list to du.
4. The second will ignore "invisible" directories (those beginning
with a .).
Points 2 and 4 probably aren't significant for the root directory, but
they certainly would be elsewhere in the file system...
-- Paul Heinlein <heinlein at madboa.com>
More information about the PLUG
mailing list