Re: du Weirdness - how is this possible

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

 



On 12/3/18 10:11 pm, Patrick O'Callaghan wrote:
On Mon, 2018-03-12 at 21:41 +1100, Stephen Morris wrote:
Thanks Ed, this functionality seems to be counter intuitive to me. Given
that du shows space used in sub-directories, it seems to me the only
useful output is du without any parameters.
'du' with no parameters recursively lists all the subdirectories and
their sizes, along with the grand total. When applied to my home
directory, I get over 30,000 lines of output. That's almost never what
I want. My usual call is 'du -hs'.

poc

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 '.'?:


bash-4.4$ ll /home/steve/Desktop/*
-rwxr-xr-x. 1 steve steve  466 Oct  3  2015 '/home/steve/Desktop/Acrobat Reader.desktop' -rwxrwxrwx. 1 steve steve  233 May  5  2014 /home/steve/Desktop/autoplus.desktop -rwxr-xr-x. 1 steve steve  310 Dec 26  2016 /home/steve/Desktop/chrome-eppojlglocelodeimnohnlnionkobfln-Default.desktop -rwxr-xr-x. 1 steve steve  374 Jan 11 07:54 /home/steve/Desktop/Eclipse.desktop -rwxr-xr-x. 1 steve steve  417 Jan 16  2017 /home/steve/Desktop/Firefox.desktop -rwxr-xr-x. 1 steve steve  358 Sep  8  2013 '/home/steve/Desktop/Google Chrome.desktop' -rwxrw-r--. 1 steve steve  412 Nov 30  2013 /home/steve/Desktop/jws_app_shortcut_1385783507561.desktop -rwxrwxr-x. 1 steve steve  247 Jan 19 07:47 /home/steve/Desktop/netbeans-8.2.desktop -rw-------. 1 steve steve  169 Mar  3  2015 '/home/steve/Desktop/Nova Genesis.url' -rwx------. 1 steve steve 2191 Mar 12 13:10 /home/steve/Desktop/steam.desktop -rwxr-xr-x. 1 steve steve  370 Jan 12 06:57 /home/steve/Desktop/Thunderbird.desktop -rwxr--r--. 1 steve steve  313 Oct  5  2013 /home/steve/Desktop/Vuescan.desktop -rwxrw-r--. 1 steve steve  362 Jan 11 07:10 /home/steve/Desktop/yatta-eclipse-launcher.desktop


bash-4.4$ du -hs /home/steve/Desktop/*
8.0K    /home/steve/Desktop/Acrobat Reader.desktop
8.0K    /home/steve/Desktop/autoplus.desktop
4.0K /home/steve/Desktop/chrome-eppojlglocelodeimnohnlnionkobfln-Default.desktop
4.0K    /home/steve/Desktop/Eclipse.desktop
4.0K    /home/steve/Desktop/Firefox.desktop
8.0K    /home/steve/Desktop/Google Chrome.desktop
8.0K    /home/steve/Desktop/jws_app_shortcut_1385783507561.desktop
4.0K    /home/steve/Desktop/netbeans-8.2.desktop
4.0K    /home/steve/Desktop/Nova Genesis.url
4.0K    /home/steve/Desktop/steam.desktop
4.0K    /home/steve/Desktop/Thunderbird.desktop
8.0K    /home/steve/Desktop/Vuescan.desktop
4.0K    /home/steve/Desktop/yatta-eclipse-launcher.desktop


bash-4.4$ du -bhs /home/steve/Desktop/*
466     /home/steve/Desktop/Acrobat Reader.desktop
233     /home/steve/Desktop/autoplus.desktop
310 /home/steve/Desktop/chrome-eppojlglocelodeimnohnlnionkobfln-Default.desktop
374     /home/steve/Desktop/Eclipse.desktop
417     /home/steve/Desktop/Firefox.desktop
358     /home/steve/Desktop/Google Chrome.desktop
412     /home/steve/Desktop/jws_app_shortcut_1385783507561.desktop
247     /home/steve/Desktop/netbeans-8.2.desktop
169     /home/steve/Desktop/Nova Genesis.url
2.2K    /home/steve/Desktop/steam.desktop
370     /home/steve/Desktop/Thunderbird.desktop
313     /home/steve/Desktop/Vuescan.desktop
362     /home/steve/Desktop/yatta-eclipse-launcher.desktop

regards,

Steve


_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
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