From owner-freebsd-questions@FreeBSD.ORG Mon Dec 17 14:04:49 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 51B5816A417 for ; Mon, 17 Dec 2007 14:04:49 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF9E13C4D3 for ; Mon, 17 Dec 2007 14:04:48 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1J4GaG-0001bA-SQ for freebsd-questions@freebsd.org; Mon, 17 Dec 2007 14:04:40 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 17 Dec 2007 14:04:40 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 17 Dec 2007 14:04:40 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Ivan Voras Date: Mon, 17 Dec 2007 15:04:25 +0100 Lines: 44 Message-ID: References: <32989.217.114.136.135.1197898685.squirrel@mail.dsa.es> <47667E61.70602@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig377DC6BD9ABF2DA39E2B53AD" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.6 (X11/20070801) In-Reply-To: <47667E61.70602@gmail.com> X-Enigmail-Version: 0.95.3 Sender: news 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:04:49 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig377DC6BD9ABF2DA39E2B53AD Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >> =20 >=20 > # du -s /etc > 17008 /etc >=20 > You need read privs to all the subdirectories, otherwise you'll get > permission errors and it'll skip those. Note that this displays usage i= n > 512-byte blocks, not bytes, but you should be able to figure it out fro= m > there. Just add "-h": # du -sh /etc 2.1M /etc --------------enig377DC6BD9ABF2DA39E2B53AD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHZoHpldnAQVacBcgRAvttAJ4qyHfMLwjqfyGoQF/xMhhwkZ2BrQCgyxmj Mnf6yHZrdmeYOp/8HsxOs/k= =NJDs -----END PGP SIGNATURE----- --------------enig377DC6BD9ABF2DA39E2B53AD--