Bug 65559 - du -D cant find specified paths
du -D cant find specified paths
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: fileutils (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: wdovlrrw
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-27 12:43 EDT by P Jones
Modified: 2007-04-18 12:42 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-05-27 12:43:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description P Jones 2002-05-27 12:43:37 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513

Description of problem:
du -D can't find paths on command line if more then three paths are specified
after a symlink

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:

mkdir a b c
mkdir a/a a/b a/c a/d
mkdir b/a b/b b/c
cd a
du -D *
rm -rfv a
ln -s ../b/a .
ln -s ../b/b e   
du -D *


Actual Results:  The first 'du' had expected output.  When you replaced
directory a/a with a link for the second invocation, thangs broked:
$ du -D *
4
a
4
b
4
c
du: `d': No such file or directory
du: `e': No such file or directory

Expected Results:  4	d
4
e

Additional info:
Comment 1 Bernhard Rosenkraenzer 2002-08-29 18:58:19 EDT
This is intentional.

What

du -D a b c d e

does is actually

cd a
du
cd ..
cd b
du
cd ..
cd c
du
cd ..
cd d
du
cd ..
cd e

Since the symlinks are dereferenced (-D) properly, this actually translates into

cd ../b/a
du
cd .. [Note we're now in ../b]
cd b [Note this is b/b, not a/b]
du
cd ..
cd c
du
cd ..
cd d [Doesn't work because b/d doesn't exist]
cd e [Doesn't work because b/e doesn't exist]

Note You need to log in before you can comment on or make changes to this bug.