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.



users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to