291 lines
10 KiB
Groff
291 lines
10 KiB
Groff
.\" Automatically generated by Pod::Man version 1.15
|
|
.\" Fri Nov 26 12:13:59 2004
|
|
.\"
|
|
.\" Standard preamble:
|
|
.\" ======================================================================
|
|
.de Sh \" Subsection heading
|
|
.br
|
|
.if t .Sp
|
|
.ne 5
|
|
.PP
|
|
\fB\\$1\fR
|
|
.PP
|
|
..
|
|
.de Sp \" Vertical space (when we can't use .PP)
|
|
.if t .sp .5v
|
|
.if n .sp
|
|
..
|
|
.de Ip \" List item
|
|
.br
|
|
.ie \\n(.$>=3 .ne \\$3
|
|
.el .ne 3
|
|
.IP "\\$1" \\$2
|
|
..
|
|
.de Vb \" Begin verbatim text
|
|
.ft CW
|
|
.nf
|
|
.ne \\$1
|
|
..
|
|
.de Ve \" End verbatim text
|
|
.ft R
|
|
|
|
.fi
|
|
..
|
|
.\" Set up some character translations and predefined strings. \*(-- will
|
|
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
|
.\" double quote, and \*(R" will give a right double quote. | will give a
|
|
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used
|
|
.\" to do unbreakable dashes and therefore won't be available. \*(C` and
|
|
.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
|
|
.tr \(*W-|\(bv\*(Tr
|
|
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
|
.ie n \{\
|
|
. ds -- \(*W-
|
|
. ds PI pi
|
|
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
|
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
|
. ds L" ""
|
|
. ds R" ""
|
|
. ds C` ""
|
|
. ds C' ""
|
|
'br\}
|
|
.el\{\
|
|
. ds -- \|\(em\|
|
|
. ds PI \(*p
|
|
. ds L" ``
|
|
. ds R" ''
|
|
'br\}
|
|
.\"
|
|
.\" If the F register is turned on, we'll generate index entries on stderr
|
|
.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
|
|
.\" index entries marked with X<> in POD. Of course, you'll have to process
|
|
.\" the output yourself in some meaningful fashion.
|
|
.if \nF \{\
|
|
. de IX
|
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
|
..
|
|
. nr % 0
|
|
. rr F
|
|
.\}
|
|
.\"
|
|
.\" For nroff, turn off justification. Always turn off hyphenation; it
|
|
.\" makes way too many mistakes in technical documents.
|
|
.hy 0
|
|
.if n .na
|
|
.\"
|
|
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
|
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
|
.bd B 3
|
|
. \" fudge factors for nroff and troff
|
|
.if n \{\
|
|
. ds #H 0
|
|
. ds #V .8m
|
|
. ds #F .3m
|
|
. ds #[ \f1
|
|
. ds #] \fP
|
|
.\}
|
|
.if t \{\
|
|
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
|
. ds #V .6m
|
|
. ds #F 0
|
|
. ds #[ \&
|
|
. ds #] \&
|
|
.\}
|
|
. \" simple accents for nroff and troff
|
|
.if n \{\
|
|
. ds ' \&
|
|
. ds ` \&
|
|
. ds ^ \&
|
|
. ds , \&
|
|
. ds ~ ~
|
|
. ds /
|
|
.\}
|
|
.if t \{\
|
|
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
|
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
|
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
|
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
|
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
|
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
|
.\}
|
|
. \" troff and (daisy-wheel) nroff accents
|
|
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
|
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
|
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
|
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
|
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
|
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
|
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
|
.ds ae a\h'-(\w'a'u*4/10)'e
|
|
.ds Ae A\h'-(\w'A'u*4/10)'E
|
|
. \" corrections for vroff
|
|
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
|
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
|
. \" for low resolution devices (crt and lpr)
|
|
.if \n(.H>23 .if \n(.V>19 \
|
|
\{\
|
|
. ds : e
|
|
. ds 8 ss
|
|
. ds o a
|
|
. ds d- d\h'-1'\(ga
|
|
. ds D- D\h'-1'\(hy
|
|
. ds th \o'bp'
|
|
. ds Th \o'LP'
|
|
. ds ae ae
|
|
. ds Ae AE
|
|
.\}
|
|
.rm #[ #] #H #V #F C
|
|
.\" ======================================================================
|
|
.\"
|
|
.IX Title "DUREP 1"
|
|
.TH DUREP 1 "durep version " "2004-09-05" "Disk Usage Report Generator"
|
|
.UC
|
|
.SH "NAME"
|
|
durep \- disk usage report generator
|
|
.SH "SYNOPSIS"
|
|
.IX Header "SYNOPSIS"
|
|
durep [\s-1OPTIONS\s0]... [\s-1DIRECTORY\s0]
|
|
.SH "DESCRIPTION"
|
|
.IX Header "DESCRIPTION"
|
|
\&\fBdurep\fR creates disk usage reports with bar graphs, allowing one to
|
|
easily deduce which directories are using the most space. Although
|
|
\&\fBdurep\fR can produce text output similar to du, its real power lies in
|
|
the ability to store reports in a file, which can then be viewed as a
|
|
web page with the supplied cgi script.
|
|
.SH "OPTIONS"
|
|
.IX Header "OPTIONS"
|
|
Options are groubed into three distinct sections.
|
|
.Sh "Text Output Options"
|
|
.IX Subsection "Text Output Options"
|
|
These options are for controlling the text report output.
|
|
.Ip "\fB\-td, \-\-text-depth\fR=\fIN\fR" 7
|
|
.IX Item "-td, --text-depth=N"
|
|
Limit text report on directories to depth \fIN\fR. No directories below
|
|
this level will be shown in the report.
|
|
.Ip "\fB \-hs, \-\-hide-size\fR=\fIN[bkmg]\fR" 7
|
|
.IX Item " -hs, --hide-size=N[bkmg]"
|
|
Do not display entries using \fIN\fR Bytes/Kb/Mb/Gb or less (default
|
|
Bytes). This is to reduce clutter in the reports. It allows you to
|
|
remove small files from the text report.
|
|
.Ip "\fB \-sd, \-\-show-date\fR" 7
|
|
.IX Item " -sd, --show-date"
|
|
Display the modification date of the file or directory in the report.
|
|
.Ip "\fB\-ns, \-\-nosort\fR" 7
|
|
.IX Item "-ns, --nosort"
|
|
Do not sort results by size. Leaves results in the order in which they
|
|
were scanned, which is highly dependant on the filesystem.
|
|
.Ip "\fB\-q, \-\-quiet\fR" 7
|
|
.IX Item "-q, --quiet"
|
|
Do not produce text output. This stops the creation of a text report,
|
|
and is useful when you are only interested in generating a save-file
|
|
for use with the web report.
|
|
.Sh "File Options"
|
|
.IX Subsection "File Options"
|
|
These options control load and save files.
|
|
.Ip "\fB\-sf, \-\-save-file\fR=\fI\s-1FILE\s0\fR" 7
|
|
.IX Item "-sf, --save-file=FILE"
|
|
Save the results of the scan into this file. This can be loaded for a
|
|
text report, but is generally used by the cgi script to display web
|
|
reports. The filename should end in \fI.ds\fR (it is appended if it does
|
|
not).
|
|
.Ip "\fB\-lf, \-\-load-file\fR=\fI\s-1FILE\s0\fR" 7
|
|
.IX Item "-lf, --load-file=FILE"
|
|
Load the results of a scan from this file. This takes the place of
|
|
scanning a directory. Inclusion options (described below) will not
|
|
take effect if this option is used.
|
|
.Ip "\fB\-d, \-\-desc\fR=\fI\s-1DESCRIPTION\s0\fR" 7
|
|
.IX Item "-d, --desc=DESCRIPTION"
|
|
Give a description to be stored in the save-file. This is displayed on
|
|
the web report summary page.
|
|
.Ip "\fB\-c, \-\-collate=\fR=\fI\s-1DIR\s0\fR" 7
|
|
.IX Item "-c, --collate==DIR"
|
|
Collate the save-files in the given directory. This creates a
|
|
\&\fIdurep.cds\fR file, which is used by the cgi script to manage and
|
|
display save-files. See \fBWeb Reports\fR section below for more detail.
|
|
.Sh "Inclusion Options"
|
|
.IX Subsection "Inclusion Options"
|
|
These options control which directories and files should be included in the report.
|
|
.Ip "\fB\-f, \-\-files\fR" 7
|
|
.IX Item "-f, --files"
|
|
Do not descend into sub-directories, only report files.
|
|
.Ip "\fB\-x, \-\-one-file-system\fR" 7
|
|
.IX Item "-x, --one-file-system"
|
|
Do not traverse file systems. This is similar to the \fB\-x\fR option for
|
|
du, allowing easy checking of an entire filesystem such as /.
|
|
.Ip "\fB\-cp, \-\-collapse-path=\fR\fI\s-1PATTERN\s0\fR" 7
|
|
.IX Item "-cp, --collapse-path=PATTERN"
|
|
Hide entries below paths that match \fI\s-1PATTERN\s0\fR. This allows you to
|
|
conceal the contents of certain directories in the report. You may
|
|
wish perhaps to show home directories in a report but not show their
|
|
content in which case you could use the option \f(CW\*(C`\-cp
|
|
\&'/home'\*(C'\fR.
|
|
.Ip "\fB\-ep, \-\-exclude-path\fR=\fI\s-1PATTERN\s0\fR" 7
|
|
.IX Item "-ep, --exclude-path=PATTERN"
|
|
Ignore paths that match \fI\s-1PATTERN\s0\fR. This works in a smilar manner to
|
|
\&\f(CW\*(C`\-cp\*(C'\fR above, except it excludes the directory from the scan itself.
|
|
.Ip "\fB\-cf, \-\-coalesce-files=\fR=\fIN[bkmg]\fR" 7
|
|
.IX Item "-cf, --coalesce-files==N[bkmg]"
|
|
Coalesces entries for files below the given size into one entry. This
|
|
is useful for reducing clutter in reports.
|
|
.SH "WEB REPORTS"
|
|
.IX Header "WEB REPORTS"
|
|
Since version 0.9, durep no longer directly generates html files for
|
|
its web reports. It now uses a cgi script that reads data from
|
|
save-files. The script will handle multiple save-files, potentially
|
|
from multiple hosts, so you can consolidate your reports into one
|
|
place. Copying save-files from other hosts is left as an exercise for
|
|
the reader.
|
|
.PP
|
|
It is necessary to collate the save-files before viewing them via the
|
|
cgi script. This process creates the file \f(CW\*(C`durep.cds\*(C'\fR which contains
|
|
metadata about all of the save-files. From this a summary page is
|
|
shown where you can choose which report you wish to view. The
|
|
collation must be done any time a save-file is added or overwritten.
|
|
.PP
|
|
The cgi-script has some configurable variables at the top. These tell
|
|
the script where to look for the css file and the graphic used for the
|
|
bar graphs. There are also options to set whether the modification
|
|
date, and/or the options used to create the save-file should be
|
|
shown. These are both set to 1 by default.
|
|
.PP
|
|
As always, you should take care when installing the cgi script. I've
|
|
done my best, but I make no guarantees about its security. It would
|
|
probably be unwise to allow this script to be accessed from the
|
|
internet at large.
|
|
.SH "EXAMPLES"
|
|
.IX Header "EXAMPLES"
|
|
.Ip "1." 3
|
|
\&\fBdurep \-td 2\fR
|
|
.Sp
|
|
This would print the directory tree starting from the current
|
|
directory to depth 2.
|
|
.Ip "2." 3
|
|
\&\fBdurep \-f /var/spool/mail\fR
|
|
.Sp
|
|
This might be useful for keeping a check on the mail directory. The
|
|
\&\f(CW\*(C`\-f\*(C'\fR switch tells durep to just scan files and not descend into
|
|
directories.
|
|
.Ip "3." 3
|
|
\&\fBdurep \-x \-cp \*(L"/(etc|usr/share)\*(R" \-ep \*(L"/var\*(R" \-sf /var/lib/durep/root.ds /\fR
|
|
.Sp
|
|
This more complicated version does the following. It scans the root
|
|
filesystem only, collapses the contents of any paths begining \fI/etc\fR
|
|
or \fI/usr/share\fR and skips the contents of the \fI/var\fR directory. It
|
|
saves the output of this report into the file
|
|
\&\fI/var/lib/durep/root.ds\fR. No text report is produced.
|
|
.Ip "4." 3
|
|
\&\fBdurep \-lf /var/lib/durep/root.ds \-hs 1m\fR
|
|
.Sp
|
|
This reads the save-file \fI/var/lib/durep/root.ds\fR and produces a text
|
|
report from it, hiding any files below 1 megabyte.
|
|
.Ip "5." 3
|
|
\&\fBdurep \-c /var/lib/durep\fR
|
|
.Sp
|
|
This collates any save-files in \fI/var/lib/durep\fR.
|
|
.SH "SEE ALSO"
|
|
.IX Header "SEE ALSO"
|
|
\&\fIdu\fR\|(1), \fIperl\fR\|(1)
|
|
.SH "AUTHOR"
|
|
.IX Header "AUTHOR"
|
|
Damian Kramer <psiren@hibernaculum.net>
|