Re: How to find total MB of a directory plus all subdirectories

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

 



On Mon, 2007-07-16 at 19:35 +0200, Valent Turkovic wrote:
> On 3/6/07, Nigel Henry <cave.dnb@xxxxxxxxxx> wrote:
> > This is a silly question perhaps. I have my soundfiles in a directory named
> > Sounds Library, this contains many subdirectories, which contain the .wav
> > files.
> >
> > What command can I use to find out the disk space this directory is taking up,
> > including all the files that are in the subdirectories?
> >
> > Nigel.
> >
> > --
> > fedora-list mailing list
> > fedora-list@xxxxxxxxxx
> > To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> >
> 
> Hi,
> I hope you appreciate this great one-liner I found for enhaced 'du' -
> it even knows how to sort kB, MB and GB sizes right!
> 
> ls -A | grep -v -e '^\.\.$' |xargs -i du -ks {} |sort -rn |head -11 |
> awk '{print $2}' | xargs -i du -hs {}

Very nice, but only summarizes the biggest 11 files (or directories).
To get more, modify the "-11" option to the "head" command or remove the
head command altogether (to get everything).

----------------------------------------------------------------------
- Rick Stevens, Principal Engineer             rstevens@xxxxxxxxxxxx -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-           What is a "free" gift?  Aren't all gifts free?           -
----------------------------------------------------------------------

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux