andre at as.no-ip.com
Thu Jul 22 11:34:44 UTC 2004
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
More information about the users