Xref: utzoo comp.unix.ultrix:2060 comp.unix.questions:17270 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!apple!oliveb!tymix!cirrusl!sunscreen!dhesi From: dhesi@sunscreen.UUCP (Rahul Dhesi) Newsgroups: comp.unix.ultrix,comp.unix.questions Subject: Re: Re^2: Can ls show total Kbytes of "foo*"? Message-ID: <1012@cirrusl.UUCP> Date: 30 Oct 89 00:59:11 GMT References: <1989Oct27.130914.12943@world.std.com> <2453@umbc3.UMBC.EDU> <4039@helios.ee.lbl.gov> <1989Oct28.181453.28177@world.std.com> Sender: news@cirrusl.UUCP Reply-To: dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) Organization: Cirrus Logic Inc. Lines: 16 I use shell scripts called "bytes" and "blocks". They are: bytes: /bin/ls -l $* | awk '{sum = sum + $4} END {print sum}' blocks: du -s $* | awk '{total += $1} END {print total}' (System V users may need to adjust the field number in the first one.) The "blocks" script gives me total blocks used by specified files and directory subtrees. Rahul Dhesi UUCP: oliveb!cirrusl!dhesi Use above addresses--email sent here via Sun.com will probably bounce.