bug-coreutils
[Top][All Lists]
Advanced

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

du -L -s not showing dirs containing symlinks to '.'


From: Kevin Korb
Subject: du -L -s not showing dirs containing symlinks to '.'
Date: Thu, 27 Jan 2005 10:13:55 -0500 (EST)

Hello,
I have found a problem with du that I believe is a bug...

As you can see from the total there are more dirs here being counted but
not listed in the summary:
# du -smLc */_boot.current
10      e/_boot.current
8       g/_boot.current
15      h/_boot.current
107     total

The files are all symlinks to directories and none are broken:
# file */_boot.current
a/_boot.current:         symbolic link to `_boot.2005-01-27.03-53-32'
b/_boot.current:         symbolic link to `_boot.2005-01-27.04-48-59'
c/_boot.current:         symbolic link to `_boot.2005-01-27.05-13-23'
d/_boot.current:         symbolic link to `_boot.2005-01-27.05-33-04'
e/_boot.current:         symbolic link to `_boot.2005-01-27.08-31-58'
f/_boot.current:         symbolic link to `_boot.2005-01-27.08-29-44'
g/_boot.current:         symbolic link to `_boot.2005-01-27.08-51-20'
h/_boot.current:         symbolic link to `_boot.2005-01-27.07-06-02'

This also happens when I du the directories directly bypassing the
symlinks:
# du -smLc a/_boot.2005-01-27.03-53-32 b/_boot.2005-01-27.04-48-59 
c/_boot.2005-01-27.05-13-23 d/_boot.2005-01-27.05-33-04 
e/_boot.2005-01-27.08-31-58 f/_boot.2005-01-27.08-29-44 
g/_boot.2005-01-27.08-51-20 h/_boot.2005-01-27.07-06-02
10      e/_boot.2005-01-27.08-31-58
8       g/_boot.2005-01-27.08-51-20
15      h/_boot.2005-01-27.07-06-02
107     total

However it works just fine without the -L:
# du -smc a/_boot.2005-01-27.03-53-32 b/_boot.2005-01-27.04-48-59 
c/_boot.2005-01-27.05-13-23 d/_boot.2005-01-27.05-33-04 
e/_boot.2005-01-27.08-31-58 f/_boot.2005-01-27.08-29-44 
g/_boot.2005-01-27.08-51-20 h/_boot.2005-01-27.07-06-02
16      a/_boot.2005-01-27.03-53-32
16      b/_boot.2005-01-27.04-48-59
16      c/_boot.2005-01-27.05-13-23
16      d/_boot.2005-01-27.05-33-04
8       e/_boot.2005-01-27.08-31-58
4       f/_boot.2005-01-27.08-29-44
8       g/_boot.2005-01-27.08-51-20
14      h/_boot.2005-01-27.07-06-02
95      total

The problem seems to be created by the fact that some of these
directores contain a symlink that points to the current directory (.):
# file */_boot.current/boot
a/_boot.current/boot: symbolic link to `.'
b/_boot.current/boot: symbolic link to `.'
c/_boot.current/boot: symbolic link to `.'
d/_boot.current/boot: symbolic link to `.'
f/_boot.current/boot:    symbolic link to `.'

When I remove that symlink the du works as expected:
# rm -v */_boot.current/boot
removed `a/_boot.current/boot'
removed `b/_boot.current/boot'
removed `c/_boot.current/boot'
removed `d/_boot.current/boot'
removed `f/_boot.current/boot'
# du -smLc */_boot.current
17      a/_boot.current
17      b/_boot.current
17      c/_boot.current
17      d/_boot.current
10      e/_boot.current
4       f/_boot.current
8       g/_boot.current
15      h/_boot.current
103     total



# du --version
du (coreutils) 5.2.1
Written by Torbjorn Granlund, David MacKenzie, Paul Eggert, and Jim Meyering.

Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# uname -a
Linux oscar2 2.6.10-gentoo-r5-OA0112 #1 SMP Mon Jan 17 19:42:53 EST 2005
x86_64 AMD Opteron(tm) Processor 246 AuthenticAMD GNU/Linux

This is an AMD Opteron running Gentoo Linux.  The filesystem is
reiserfs.  I manually compiled a clean copy of coreutils just to make
sure that the patches in Gentoo's portage were not the problem and my
clean compile worked exactly the same.

--
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
        Kevin Korb                      Phone:    (407) 252-6853
        Systems Administrator           Internet:
        FutureQuest, Inc.               address@hidden  (work)
        Orlando, Florida                address@hidden (personal)
        Web page:                       http://www.sanitarium.net/
        PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]