Re: ls question

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

 



On Wed, Jul 21, 2004 at 06:15:50PM -0400, Sam Tregar wrote:
> 
> On Wed, 21 Jul 2004, Michael Sullivan wrote:

> > Anyway, in MS-DOS, when you ask for a directory listing, it listed the
> > files in the directory you were asking for (like ls), but it also gave a
> > listing of the total bytes contained in the files in the listing you asked
> > for.  I was wondering if there was any way I could do that with ls.

> I use 'du' for this.  For example, to see how much space I'm wasting
> on mp3s:
> 
>   $ cd mp3
>   $ du -sh .
>   3.6G     .
> 
> That number includes all the files in mp3/ and all subdirectories,
> which is usually what I want.  For more information about 'du' run
> 'man du'.

And if you don't want the subdirectories, add -S to this command:
$ du -shS

-- 
Kind regards,

Andre



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux