[Bug 5288] New: du not reporting hard links as same

bugzilla at busybox.net bugzilla at busybox.net
Wed Jun 6 17:35:01 UTC 2012


https://bugs.busybox.net/show_bug.cgi?id=5288

           Summary: du not reporting hard links as same
           Product: Busybox
           Version: 1.19.x
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Standard Compliance
        AssignedTo: unassigned at busybox.net
        ReportedBy: adrianh.bsc at gmail.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


When using Tiny Core Linux I found that du was counting hard linked files as
different.  Getting coreutils.tcz fixed the problem but the base is still
incorrect.

Test:

printf "% $((12*1024))s" '' > file1
cp -l file1 file2
cp file2 file3
ls -li file*
du -sc file*


Expected that du either doesn't show file2 or reports that it is smaller in
size.  ls shows that the inodes of file1 and file2 are the same.

Expected result:
 818936 -rw-r--r--    2 backup   backup       12288 Jun  6 08:52 file1
 818936 -rw-r--r--    2 backup   backup       12288 Jun  6 08:52 file2
 818945 -rw-r--r--    1 backup   backup       12288 Jun  6 08:52 file3
12      file1
12      file3
24      total

Received result:
 818936 -rw-r--r--    2 backup   backup       12288 Jun  6 08:55 file1
 818936 -rw-r--r--    2 backup   backup       12288 Jun  6 08:55 file2
 857130 -rw-r--r--    1 backup   backup       12288 Jun  6 08:55 file3
12      file1
12      file2
12      file3
36      total

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list