From owner-freebsd-stable@FreeBSD.ORG Wed Oct 8 04:18:28 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC672106568D for ; Wed, 8 Oct 2008 04:18:28 +0000 (UTC) (envelope-from lhmwzy@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 455798FC14 for ; Wed, 8 Oct 2008 04:18:27 +0000 (UTC) (envelope-from lhmwzy@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so2451480fgb.35 for ; Tue, 07 Oct 2008 21:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=CIAFjYcww9PPY9u7q1rwXFeU9yTmehH8nsG2k/ukVn8=; b=Jz8f+y2f5rXViuOsRIb4EaEZRrK7o9quIoXl0CYLWOCe7fRVamW+dDCqhf3XAZf2sN IZjfVUcJOx+E+TVFYjsPToMozGL6lTaPeXaok7Gcegn4xSxRU+TfLjtOIgLKDfyQrof1 46LgmzcBAO4IUb5V4uf6S1hLx+UmyulGkuJhY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=nWRT4J5MkJSWgmg8a8cbIs+H0acIvMubs6XcCbGugsjamHVkwjdWL7E3+DO1MLteEX SW0jmu3G9mEi6OAtZXKVZ4EE8gciYECATxh6Ea1KnAY7h38FPll6fEaiNT2L8zwcUn/A 1LQ8KLW24glFXLNh9WgN6gA+nmjxh4WskACb0= Received: by 10.86.29.8 with SMTP id c8mr7044204fgc.23.1223439505272; Tue, 07 Oct 2008 21:18:25 -0700 (PDT) Received: by 10.86.25.10 with HTTP; Tue, 7 Oct 2008 21:18:25 -0700 (PDT) Message-ID: <78fb9d960810072118k47a64097yaa486ef5179efb1@mail.gmail.com> Date: Wed, 8 Oct 2008 12:18:25 +0800 From: lhmwzy To: "Andrew Snow" In-Reply-To: <48EB5ADD.2090900@modulus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200810071314.45922.max@love2party.net> <48EB5ADD.2090900@modulus.org> Cc: freebsd-stable@freebsd.org Subject: Re: zfs quota question X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 04:18:28 -0000 The fllow is better? #!/bin/sh find $1 -type f -exec ls -lh {} \; | awk '{j += $5} END {print j"M"}' 2008/10/7 Andrew Snow : >> I love ZFS, but I suddenly found out last night that I >> have lost the ability tto do a 'du' on a directory to work out if it will >> fit onto a CD or not :-) > > I have created a shell script, /usr/local/bin/dirsize : > > > #!/bin/sh > find $1 -type f -ls | awk '{j += $7} END {print j}' > > > > Usage: dirsize > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >