bug-coreutils
[Top][All Lists]
Advanced

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

bug#10863: closed (Re: bug#10863: A possible du bug?)


From: George R Goffe
Subject: bug#10863: closed (Re: bug#10863: A possible du bug?)
Date: Tue, 21 Feb 2012 12:55:33 -0800 (PST)

Eric,

I use this command in filesystems where the usage is at 100% or nearly so and I 
need to find possible offending files that are BIG. The syntax works great for 
NON / filesystems where there are no other partitions mounted. 


I had assumed that -x would prohibit descending into directories in OTHER 
filesystems or partitions. I suppose I could exclude mount points manually but 
I'd have to remember to update the exclude file whenever I mount other 
partitions. This tactic would fail if there was no partition mounted but the 
specific mount point was the culprit like when a user gets root (not uncommon 
in the environments I work in) and goofs by copying data to a mount point but 
has NOT mounted a partition first. My purpose with this command is to 
recursively find directories with large files in them so I can deal with them 
appropriately.

Any thoughts would be appreciated.

Regards,

George...

 
"It's not what you know that hurts you, It's what you know that ain't so." Will 
Rogers... Will would say, "STIFF THE FED"!!!


________________________________
 From: GNU bug Tracking System <address@hidden>
To: George R Goffe <address@hidden> 
Sent: Tuesday, February 21, 2012 9:27 AM
Subject: bug#10863: closed (Re: bug#10863: A possible du bug?)
 
Your bug report

#10863: A possible du bug?

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to address@hidden

-- 
10863: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10863
GNU Bug Tracking System
Contact address@hidden with problems
tag 10863 notabug
thanks

On 02/21/2012 05:22 AM, George R Goffe wrote:
> Hi,
> 
> I'm running the du command from / and am seeing other file systems even 
> though -x is specified. 
> 
> 
> Here's the full command + args: du -xs -- .??* * | sort -k1nr | more

> Am I doing something wrong or misunderstanding something?

There's your problem.  -x applies to each command line argument, but you
are passing multiple command line arguments.  Therefore, you are
computing the disk usage of /usr and all subdirectories within the same
device as /usr, of /opt and all subdirectories within the same device as
/opt, and so forth.

If you really wanted to compute the usage of just / and all
subdirectories on the same device as /, then use du -x /, not du -x /*.

I'm closing this out as not a bug, as the du was doing what it was asked
after the shell glob expansion is taken into account.

Side note - your glob does not list all files.  It's possible to name a
file '.a', which matches neither '.??*' nor '*'.  To properly catch
_all_ files, you need three globs, as in '.??* * .[!.]'.

-- 
Eric Blake  address@hidden   +1-919-301-3266
Libvirt virtualization library http://libvirt.org


Hi,

I'm running the du command from / and am seeing other file systems even though 
-x is specified. 


Here's the full command + args: du -xs -- .??* * | sort -k1nr | more

Here's the some of the output (top 3 lines):

24773452        usr
18705448        opt
1939044 var


df /usr /opt /var
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda7       30334620 25571060   4459476  86%
 /usr
/dev/sda6       21953708 19160644   2572864  89% /opt
/dev/sda5        3138272  2051120   1055696  67% /var



Am I doing something wrong or misunderstanding something?

Regards,

George...

version: coreutils-8.13 + patches


qconfigure args:  ./configure --prefix=/usr/lsd/$osname --verbose        \
             --enable-silent-rules                     
 \
             --enable-dependency-tracking               \
             --enable-threads=posix                     \
             --enable-gcc-warnings                      \
             --disable-nls                             
 \
             --with-gnu-ld                              \
             --with-tty-group=tty


 
"It's not what you know that hurts you, It's what you know that ain't so." Will 
Rogers... Will would say, "STIFF THE FED"!!!


reply via email to

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