From owner-freebsd-questions Thu May 10 17:22:56 2001 Delivered-To: freebsd-questions@freebsd.org Received: from gadolinium.btinternet.com (gadolinium.btinternet.com [194.73.73.111]) by hub.freebsd.org (Postfix) with ESMTP id 7749B37B422 for ; Thu, 10 May 2001 17:22:53 -0700 (PDT) (envelope-from umarumohammed@btinternet.com) Received: from [213.120.99.35] (helo=muddywaters) by gadolinium.btinternet.com with smtp (Exim 3.03 #83) id 14y0he-00046A-00; Fri, 11 May 2001 01:22:42 +0100 Date: Fri, 11 May 2001 01:23:47 +0100 To: Linh Pham Cc: freebsd-questions@FreeBSD.org From: umarumohammed@hg15.btinternet.com Subject: Re: du - It Doesn't Add Up? Reply-To: iumarumo@eidosnet.co.uk X-Mailer: Opera 5.11 build 904 X-Priority: 3 (Normal) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-Id: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 10/05/01 23:07:54, Linh Pham wrote: >On 2001-05-10, Drew Tomlinson scribbled: ># 117 Blacksheep# du -hc /etc <\snip> Here you have specified a directory to perform du on - so the total (-c option) will be for the contents below this directory. du will recursively descend this directory and list all files within, and print their sizes in human readable format (-h option)... ># 97K /etc/defaults ># 32K /etc/periodic/daily ># 11K /etc/periodic/weekly ># 3.0K /etc/periodic/monthly ># 47K /etc/periodic ># 4.0K /etc/ssh ># 9.0K /etc/ssl ># 2.0K /etc/gnats ># 34K /etc/isdn ># 1.0K /etc/kerberosIV ># 148K /etc/mail ># 44K /etc/mtree ># 10.0K /etc/namedb ># 5.0K /etc/ppp ># 1.0K /etc/skel ># 17K /etc/uucp ># 12M /etc ># 12M total ># ># If I add up the numbers, I only get a total of 462K, not 12M as indicated. ># What am I missing? > <\snip> I think the -a option make du list files along with directories, here you only get a directory listing. >The `12M /etc' line means that /etc altogether is 12M (probably have a >large file directly under /etc?) > <\snip> No, etc is a directory, 12M is the size of the directory including all its contents. Kindest regards, --ibs. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message