From owner-svn-src-stable@FreeBSD.ORG Fri Mar 1 09:40:03 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D35536CF; Fri, 1 Mar 2013 09:40:03 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ADEE225D; Fri, 1 Mar 2013 09:40:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r219e3Cj080864; Fri, 1 Mar 2013 09:40:03 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r219e3TG080861; Fri, 1 Mar 2013 09:40:03 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201303010940.r219e3TG080861@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 1 Mar 2013 09:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247539 - stable/8/usr.bin/du X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 09:40:03 -0000 Author: des Date: Fri Mar 1 09:40:02 2013 New Revision: 247539 URL: http://svnweb.freebsd.org/changeset/base/247539 Log: MFH (r238602): add -g (gigabyte) flag Modified: stable/8/usr.bin/du/du.1 stable/8/usr.bin/du/du.c Directory Properties: stable/8/usr.bin/du/ (props changed) Modified: stable/8/usr.bin/du/du.1 ============================================================================== --- stable/8/usr.bin/du/du.1 Fri Mar 1 09:39:53 2013 (r247538) +++ stable/8/usr.bin/du/du.1 Fri Mar 1 09:40:02 2013 (r247539) @@ -32,7 +32,7 @@ .\" @(#)du.1 8.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd December 17, 2011 +.Dd July 18, 2012 .Dt DU 1 .Os .Sh NAME @@ -42,7 +42,7 @@ .Nm .Op Fl Aclnx .Op Fl H | L | P -.Op Fl h | k | m +.Op Fl g | h | k | m .Op Fl a | s | d Ar depth .Op Fl B Ar blocksize .Op Fl I Ar mask @@ -67,9 +67,9 @@ Calculate block counts in .Ar blocksize byte blocks. This is different from the -.Fl h, k +.Fl h, k, m and -.Fl m +.Fl g options or setting .Ev BLOCKSIZE and gives an estimate of how much space the examined file hierarchy would @@ -99,13 +99,15 @@ Display a grand total. Display an entry for all files and directories .Ar depth directories deep. +.It Fl g +Display block counts in 1073741824-byte (1 GiB) blocks. .It Fl h .Dq Human-readable output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte. .It Fl k -Display block counts in 1024-byte (1-Kbyte) blocks. +Display block counts in 1024-byte (1 kiB) blocks. .It Fl l If a file has multiple hard links, count its size multiple times. The default behavior of @@ -116,7 +118,7 @@ When the option is specified, the hard link checks are disabled, and these files are counted (and displayed) as many times as they are found. .It Fl m -Display block counts in 1048576-byte (1-Mbyte) blocks. +Display block counts in 1048576-byte (1 MiB) blocks. .It Fl n Ignore files and directories with user .Dq nodump Modified: stable/8/usr.bin/du/du.c ============================================================================== --- stable/8/usr.bin/du/du.c Fri Mar 1 09:39:53 2013 (r247538) +++ stable/8/usr.bin/du/du.c Fri Mar 1 09:40:02 2013 (r247539) @@ -114,7 +114,7 @@ main(int argc, char *argv[]) depth = INT_MAX; SLIST_INIT(&ignores); - while ((ch = getopt(argc, argv, "AB:HI:LPasd:chklmnrt:x")) != -1) + while ((ch = getopt(argc, argv, "AB:HI:LPasd:cghklmnrt:x")) != -1) switch (ch) { case 'A': Aflag = 1; @@ -161,6 +161,10 @@ main(int argc, char *argv[]) case 'c': cflag = 1; break; + case 'g': + hflag = 0; + blocksize = 1073741824; + break; case 'h': hflag = 1; break;