Re: du Weirdness - how is this possible

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

 



On 13/3/18 9:33 am, Robert Nichols wrote:
On 03/12/2018 03:26 PM, Stephen Morris wrote:
Thanks Patrick, taking this a step further, it seems to me that the only parameter for du that, to me, provides the correct file size is -b as shown below. I am listing my Desktop directory via ll, du -hs and du -bhs. Just further to this is it a bug with du that the -a parameter which is supposed to list all files not just directories, does not list files prefixed with a '.'?:

The du command is doing exactly what it is told to do. It is your _shell_ that is expanding the "*" into a list of names that does not (by default) include "dot" names. The du command is never asked to look at the current directory, and thus will never see the dotfiles, regardless of what flag arguments you use. What you are complaining about is like running "du -a [abc]*" and complaining that names beginning with "d" were not included.

Whenever you have questions like this, you should run "set -x" in the shell to see exactly how commands are being invoked. (Run "set +x" to turn that off again.)

I'm not sure what the point of this command is relative to du, it seems to be more relevant when using commands that are aliases.

Having issued the command "set -x", if I issue the command du -abh /home/steve/workspace it just echos that command back, and if I issue the command du -abh /home/steve/workspace/* it echos the command with a list of sub-directories of workspace that du is going to do its work over. If I issue my alias command "la /home/steve/workspace" it echos back the command "ls --color -a /home/steve/workspace", which is much more meaningful.


regards,

Steve

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux