App-Dusage
view release on metacpan or search on metacpan
lib/App/Dusage.pm view on Meta::CPAN
B<dusage> is driven by a control file that describes the names of the
files (directories) to be reported. It also contains the results of
previous runs.
When B<dusage> is run, it reads the control file, optionally gathers
new disk usage values by calling the B<du> program, prints the report,
and optionally updates the control file with the new information.
Filenames in the control file may have wildcards. In this case, the
wildcards are expanded, and all entries reported. Both the expanded
names as the wildcard info are maintained in the control file. New
files in these directories will automatically show up, deleted files
will disappear when they have run out of data in the control file (but
see the B<-r> option).
Wildcard expansion only adds filenames that are not already on the list.
The control file may also contain filenames preceded with an
exclamation mark C<!>; these entries are skipped. This is meaningful
in conjunction with wildcards, to exclude entries which result from a
lib/App/Dusage.pm view on Meta::CPAN
- for manual pages
maildir 6518::::::
maildir/dirent 2::::::
maildir/*
!maildir/unimportant
src 498::::::
The names in the control file are separated by the values with a C<Tab>;
the values are separated by colons. Also, the entries found by
expanding the wildcard are added. If the wildcard expansion had
generated a name ``maildir/unimportant'' it would have been skipped.
When the program is rerun after one day, it could print the following
report:
Disk usage statistics for manual pages Thu Nov 23 17:25:44 2000
blocks +day +week directory
------- ------- ------- --------------------------------
6524 +6 maildir
( run in 0.417 second using v1.01-cache-2.11-cpan-5b529ec07f3 )