From owner-freebsd-questions@FreeBSD.ORG Mon Dec 17 14:09:45 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 714BC16A41A for ; Mon, 17 Dec 2007 14:09:45 +0000 (UTC) (envelope-from dave.list@pixelhammer.com) Received: from smtp2.tls.net (smtp2.tls.net [65.196.224.83]) by mx1.freebsd.org (Postfix) with ESMTP id 1EA0613C504 for ; Mon, 17 Dec 2007 14:09:44 +0000 (UTC) (envelope-from dave.list@pixelhammer.com) Received: (qmail 16112 invoked from network); 17 Dec 2007 14:09:43 -0000 Received: by simscan 1.2.3 ppid: 16091, pid: 16108, t: 0.2684s scanners: attach: 1.2.3 clamav: 0.91.1/m:45 spam: 3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on smtp-2.tls.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=20.0 tests=ALL_TRUSTED,TVD_RCVD_IP autolearn=disabled version=3.2.1 Received: from 208-70-40-123.bb.hrtc.net (HELO ?192.168.0.109?) (ldg%tls.net@208.70.40.123) by auth-smtp2.tls.net with ESMTPA; 17 Dec 2007 14:09:43 -0000 Message-ID: <47668320.5000706@pixelhammer.com> Date: Mon, 17 Dec 2007 09:09:36 -0500 From: DAve User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <32989.217.114.136.135.1197898685.squirrel@mail.dsa.es> <47667E61.70602@gmail.com> In-Reply-To: <47667E61.70602@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: How to know total number of bytes of a directory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2007 14:09:45 -0000 Andy Greenwood wrote: > DSA - JCR wrote: >> Hi all >> >> I would like to know the total number of bytes of a directory and its >> related subdirs, occupied by the files inside it. I haven't found any >> command for knowning it. >> > > # du -s /etc > 17008 /etc > > You need read privs to all the subdirectories, otherwise you'll get > permission errors and it'll skip those. Note that this displays usage in > 512-byte blocks, not bytes, but you should be able to figure it out from > there. -h provides human readable output. du -sh /etc 3.8M /etc DAve -- Google finally, after 7 years, provided a logo for veterans. Thank you Google. What to do with my signature now?