On Tue, 2004-10-12 at 11:29 -0600, Grant Robinson wrote: > On Oct 12, 2004, at 8:26 AM, Andrew Jorgensen wrote: > > > I'd like to find the total file size of a directory (with > > sub-directories). I can use 'du -s' except that I've been told that > > 'du' reports disk usage, which is not the same as file size. 'ls -l' > > will tell me the actual size of a single file, but won't tell me the > > sum of the sizes of files in a directory. > > My question is why you would want summed file sizes (the actual sizes > of the file) vs. how much disk space the files are actually using? It > seems that what most people are really interested in is how much space > a directory (and the files and sub-directories inside) are using up on > the disk. Are you trying to calculate file system overhead or > something? You already received some answers on how to use file size, > if this is really what you want to do, so I won't repeat them.
Well if you are building an ISO image or something, then you want to know how much total space the files will take up, not how much space they are taking up on disk. > > Grant > > > ____________________ > BYU Unix Users Group > http://uug.byu.edu/ > ___________________________________________________________________ > List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list -- ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list