[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DU and hard links
From: |
Jim Meyering |
Subject: |
Re: DU and hard links |
Date: |
Sat, 27 Mar 2004 09:01:04 +0100 |
Anthony Thyssen <address@hidden> wrote:
> I have a series of backup home directories what use hardlinks on files
> that have not changed. If I run "du" on these directories I get
> a disk usage summery as if the directories are not hard linked together!
>
> How can I get real disk usage summery. IE: the cost in disk space of
> the second and later directories without re-counting files already seen
> due to hard links!!!
Please give us more information.
What version of du are you using?
What was the precise command you used?
If it's still doing something unexpected, it'd
be nice if you could pare it down to a small test case.
du from the latest release (coreutils-5.2.1) works fine for me:
$ dd if=/dev/zero bs=1M count=10 > k 2>/dev/null
$ ln k kk
$ du -c k kk
10256 k
10256 total
Note that the 10M file is counted just once.
Also, it is required that only one of the two files be listed)
Be sure you're not using the --count-links (-l) option.
--
ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.2.1.tar.gz
ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.2.1.tar.bz2
(coreutils is the union of fileutils, textutils, and sh-utils)
- DU and hard links, Anthony Thyssen, 2004/03/26
- Re: DU and hard links,
Jim Meyering <=