Path: utzoo!utgpu!watserv1!watmath!att!cbnews!ask From: ask@cbnews.att.com (Arthur S. Kamlet) Newsgroups: comp.unix.questions Subject: Re: What's wrong with this Bourne shell script? Message-ID: <1990Aug5.190318.5214@cbnews.att.com> Date: 5 Aug 90 19:03:18 GMT References: <1990Aug3.193231.3166@silma.com> Distribution: na Organization: AT&T Bell Laboratories, Columbus, Ohio Lines: 17 In article <1990Aug3.193231.3166@silma.com> aab@silma.UUCP (Andy Burgess) writes: >While you're at it, is there a better way to get the total bytes >of the files in a directory? Well, wc .* * will do a fairly good job (remember to surtract out the . and .. figures. If you want to find the nested files too, combine with find. But are you really interested in finding the number of bytes? Perhaps for your need the number of blocks in the directory, including nested directories in the same filesystem, can be found more quickly by reading the superblock with a du -s dir_name (On my Unix V system, if I don't have read permission, du will silently not give me those sizes.) -- Art Kamlet a_s_kamlet@att.com AT&T Bell Laboratories, Columbus