3 #=======================================================================
5 # File ID: 27f00bc8-0903-11de-ac56-000475e441b9
7 # List all directories in the subtree, sorted by size
9 # Author: Øyvind A. Holm <sunny@sunbase.org>
10 # License: GNU General Public License version 2 or later.
11 #=======================================================================
25 " -n "$progname" -- "$@
")"
26 test "$?" = "0" ||
exit 1
34 -h|
--help) opt_help
=1; shift ;;
35 -q|
--quiet) opt_quiet
=$
(($opt_quiet + 1)); shift ;;
36 -v|
--verbose) opt_verbose
=$
(($opt_verbose + 1)); shift ;;
37 --version) echo $progname $VERSION; exit 0 ;;
39 *) echo $progname: Internal error
>&2; exit 1 ;;
42 opt_verbose
=$
(($opt_verbose - $opt_quiet))
44 if test "$opt_help" = "1"; then
45 test $opt_verbose -gt 0 && { echo; echo $progname $VERSION; }
48 List all directories in the subtree, sorted by size
50 Usage: $progname [options]
57 Be more quiet. Can be repeated to increase silence.
59 Increase level of verbosity. Can be repeated.
61 Print version information.
70 suuid
-m -t upd
-w o
--raw -c "<c_upd> <host>$(
71 hostname)</host> <directory>$(/bin/pwd)</directory> </c_upd>"
73 grep -q '^# ........-....-....-....-............$' $DUFILE ||
{
74 echo upd
: Error generating uuid
, aborting.
>&2
81 s/^(\d{3,})/commify($1)/ge;
85 my $Str = reverse $_[0];
86 $Str =~ s/(\d\d\d)(?=\d)(?!\d*\,)/$1\./g;
87 return scalar reverse $Str;
89 echo -n "# smsum:" >>$DUFILE
90 echo $
(smsum
<$DUFILE) >>$DUFILE
92 chown sunny.sunny
$DUFILE