CVS commit: othersrc/external/bsd/dust/dist

2017-08-30 Thread Thomas Klausner
Module Name:othersrc
Committed By:   wiz
Date:   Wed Aug 30 19:22:06 UTC 2017

Modified Files:
othersrc/external/bsd/dust/dist: dust.1

Log Message:
Bump date for previous. Add missing .El.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/dust/dist/dust.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/dust/dist/dust.1
diff -u othersrc/external/bsd/dust/dist/dust.1:1.3 othersrc/external/bsd/dust/dist/dust.1:1.4
--- othersrc/external/bsd/dust/dist/dust.1:1.3	Wed Aug 30 19:18:31 2017
+++ othersrc/external/bsd/dust/dist/dust.1	Wed Aug 30 19:22:06 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: dust.1,v 1.3 2017/08/30 19:18:31 ginsbach Exp $
+.\" $NetBSD: dust.1,v 1.4 2017/08/30 19:22:06 wiz Exp $
 .\"
 .\" Copyright (c) 2014 Alistair Crooks 
 .\" All rights reserved.
@@ -23,7 +23,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 2, 2014
+.Dd August 30, 2017
 .Dt DUST 1
 .Os
 .Sh NAME
@@ -56,6 +56,7 @@ perform the listing silently, recursing 
 but only printing the results at the topmost level of specification.
 .It Fl x
 Filesystem mounts points are not traversed.
+.El
 .Sh EXIT STATUS
 .Ex -std dust
 .Sh EXAMPLES



CVS commit: othersrc/external/bsd/dust/dist

2017-08-30 Thread Brian Ginsbach
Module Name:othersrc
Committed By:   ginsbach
Date:   Wed Aug 30 19:18:31 UTC 2017

Modified Files:
othersrc/external/bsd/dust/dist: dust.1 dust.sh

Log Message:
Add a way to pass -a and -x to du(1).  These allow one to 'dust' a
filesystem (-x) or see what files are the big offenders (-a) rather
than just the big directories (default).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/dust/dist/dust.1 \
othersrc/external/bsd/dust/dist/dust.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/dust/dist/dust.1
diff -u othersrc/external/bsd/dust/dist/dust.1:1.2 othersrc/external/bsd/dust/dist/dust.1:1.3
--- othersrc/external/bsd/dust/dist/dust.1:1.2	Wed Apr  2 08:50:43 2014
+++ othersrc/external/bsd/dust/dist/dust.1	Wed Aug 30 19:18:31 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: dust.1,v 1.2 2014/04/02 08:50:43 wiz Exp $
+.\" $NetBSD: dust.1,v 1.3 2017/08/30 19:18:31 ginsbach Exp $
 .\"
 .\" Copyright (c) 2014 Alistair Crooks 
 .\" All rights reserved.
@@ -31,8 +31,9 @@
 .Nd print directory listings ordered by size
 .Sh SYNOPSIS
 .Nm
-.Op Fl rs
-.Ar file ...
+.Op Fl rx
+.Op Fl a | Fl s
+.Op Ar file ...
 .Sh DESCRIPTION
 The
 .Nm
@@ -42,15 +43,19 @@ to retrieve the sizes on disk of the
 specified files and directories,
 and orders them in size order.
 .Bl -tag -width XrX
+.It Fl a
+Display an entry for each file in the directory hierarchy.
 .It Fl r
 Reverse the order of the output \(em instead of printing
-the directory entries in smallest to largest order,
+the directory or file entries in smallest to largest order,
 this argument will print the entries in largest to smallest order.
 .It Fl s
 As in
 .Xr du 1 ,
 perform the listing silently, recursing into directories,
 but only printing the results at the topmost level of specification.
+.It Fl x
+Filesystem mounts points are not traversed.
 .Sh EXIT STATUS
 .Ex -std dust
 .Sh EXAMPLES
Index: othersrc/external/bsd/dust/dist/dust.sh
diff -u othersrc/external/bsd/dust/dist/dust.sh:1.2 othersrc/external/bsd/dust/dist/dust.sh:1.3
--- othersrc/external/bsd/dust/dist/dust.sh:1.2	Wed Aug 30 18:49:31 2017
+++ othersrc/external/bsd/dust/dist/dust.sh	Wed Aug 30 19:18:31 2017
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: dust.sh,v 1.2 2017/08/30 18:49:31 ginsbach Exp $
+# $NetBSD: dust.sh,v 1.3 2017/08/30 19:18:31 ginsbach Exp $
 
 # Copyright (c) 2013 Alistair Crooks 
 # All rights reserved.
@@ -26,26 +26,38 @@
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-# Usage: dust [-r] [-s] file...
+# Usage: dust [-rx] [-a | -s] file...
+#	-a == list all files, don't summarize by directory
 # 	-r == reverse sort, largest first, smallest last
 #	-s == silent execution of du, don't recurse into subdirs
+#	-x == file system mount points are not traversed
 
+all=""
+exclude=""
 revsort=""
 silent=""
-while getopts "rs" arg; do
+while getopts "arsx" arg; do
 	case "$arg" in
+	a)	all="-a" ;;
 	r)	revsort="-r" ;;
 	s)	silent="-s" ;;
-	*)	echo "Usage: $(basename $0) [-r] [-s] [file ...]"; exit 1 ;;
+	x)	exclude="-x" ;;
+	*)	echo "Usage: $(basename $0) [-rx] [-a | -s] [file ...]" 2>&1
+		exit 1 ;;
 	esac
 done
 shift $(expr $OPTIND - 1)
 
+if [ -n "${all}" ] && [ -n "${silent}" ]; then
+	echo "Usage: $(basename $0) [-rx] [-a | -s] [file ...]" 2>&1
+	exit 1
+fi
+
 awk=/usr/bin/awk
 du=/usr/bin/du
 sort=/usr/bin/sort
 
-${du} -h ${silent} "$@" | ${awk} '
+${du} -h ${all} ${exclude} ${silent} "$@" | ${awk} '
 BEGIN {
 	n = 1; sufs = "BKMGT";
 	for (i = 1 ; i <= length(sufs) ; i++) {



CVS commit: othersrc/external/bsd/dust/dist

2017-08-30 Thread Brian Ginsbach
Module Name:othersrc
Committed By:   ginsbach
Date:   Wed Aug 30 18:49:32 UTC 2017

Modified Files:
othersrc/external/bsd/dust/dist: dust.sh

Log Message:
Fix option handling so options are actually processed. [approved by agc]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/dust/dist/dust.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/dust/dist/dust.sh
diff -u othersrc/external/bsd/dust/dist/dust.sh:1.1.1.1 othersrc/external/bsd/dust/dist/dust.sh:1.2
--- othersrc/external/bsd/dust/dist/dust.sh:1.1.1.1	Wed Apr  2 04:38:22 2014
+++ othersrc/external/bsd/dust/dist/dust.sh	Wed Aug 30 18:49:31 2017
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: dust.sh,v 1.1.1.1 2014/04/02 04:38:22 agc Exp $
+# $NetBSD: dust.sh,v 1.2 2017/08/30 18:49:31 ginsbach Exp $
 
 # Copyright (c) 2013 Alistair Crooks 
 # All rights reserved.
@@ -34,11 +34,12 @@ revsort=""
 silent=""
 while getopts "rs" arg; do
 	case "$arg" in
-	-r)	revsort="-r" ;;
-	-s)	silent="-s" ;;
-	*)	break;
+	r)	revsort="-r" ;;
+	s)	silent="-s" ;;
+	*)	echo "Usage: $(basename $0) [-r] [-s] [file ...]"; exit 1 ;;
 	esac
 done
+shift $(expr $OPTIND - 1)
 
 awk=/usr/bin/awk
 du=/usr/bin/du



CVS commit: othersrc/external/bsd/dust/dist

2014-04-02 Thread Thomas Klausner
Module Name:othersrc
Committed By:   wiz
Date:   Wed Apr  2 08:50:43 UTC 2014

Modified Files:
othersrc/external/bsd/dust/dist: dust.1

Log Message:
Fix typo, whitespace, use .Ex, use EXIT STATUS instead of RETURN VALUES, use
em-dash.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/dust/dist/dust.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/dust/dist/dust.1
diff -u othersrc/external/bsd/dust/dist/dust.1:1.1.1.1 othersrc/external/bsd/dust/dist/dust.1:1.2
--- othersrc/external/bsd/dust/dist/dust.1:1.1.1.1	Wed Apr  2 04:38:22 2014
+++ othersrc/external/bsd/dust/dist/dust.1	Wed Apr  2 08:50:43 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: dust.1,v 1.1.1.1 2014/04/02 04:38:22 agc Exp $
+.\ $NetBSD: dust.1,v 1.2 2014/04/02 08:50:43 wiz Exp $
 .\
 .\ Copyright (c) 2014 Alistair Crooks a...@netbsd.org
 .\ All rights reserved.
@@ -32,7 +32,7 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl rs
-.Ar file...
+.Ar file ...
 .Sh DESCRIPTION
 The
 .Nm
@@ -41,21 +41,18 @@ command uses
 to retrieve the sizes on disk of the
 specified files and directories,
 and orders them in size order.
-.Bl -tag -width keyring1234567
+.Bl -tag -width XrX
 .It Fl r
-Reverse the order of the output \- instead of printing
+Reverse the order of the output \(em instead of printing
 the directory entries in smallest to largest order,
 this argument will print the entries in largest to smallest order.
 .It Fl s
 As in
 .Xr du 1 ,
-perform the listing silently, recurisng into directories,
+perform the listing silently, recursing into directories,
 but only printing the results at the topmost level of specification.
-.Sh RETURN VALUES
-The
-.Nm
-utilities will return 0 for success,
-and non-zero for failure.
+.Sh EXIT STATUS
+.Ex -std dust
 .Sh EXAMPLES
 .Bd -literal
 % dust .