On 13/3/18 8:10 am, Ed Greshko wrote:
On 03/13/18 04:26, Stephen Morris wrote:
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 '.'?:
Of course not.
Compare the -a opt of ls with that of du in their man pages.
ls
-a, --all do not ignore entries starting with
du
-a, --all write counts for all files, not just directories
With du it is saying "all files found based on the pattern specified in [FILES]" And like all shell commands [FILES} follows the rules of "globbing". Gordon has already told you a method you can use to have du consider "." files.
This is by turning on the shell option "dotglob".
Run the "shopt" command by itself and notice the setting for "dotglob". Then set it with -s to see how this affects commands when you use "*". And -u will unset options.
You would probably benefit from doing a bit of searching and finding pages such as
https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html#Th...
and more generally
Thanks Ed, I'll check the doco out, I was just expecting the command to do exactly what the help info said, output the information for all files, not just a subset.
regards,
Steve
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org