man durep (Commandes) - disk usage report generator

NAME

durep - disk usage report generator

SYNOPSIS

durep [OPTION]... [DIRECTORY]

DESCRIPTION

durep was designed for monitoring disk usage in a more visual way than du. The du program works fine but doesn't allow a lot of control over how the results are displayed. This perl script is designed to produce output more useful for reports.

Although durep can produce text output similar to du, its real advantage is that it allows you to navigate through the directory structure as web pages. Each page shows bar graphs for entries so it is easy to see immediately which directory is using the most storage space. The report generated can be configured in several ways (hiding directories, collapsing directory entries, hiding entries below certain sizes, etc) all of which are described below.

The text report that durep generates is also configurable. You may limit the depth to which it displays entries, allowing a quick non-detailed view. This is generally meant to compliment the web views.

OPTIONS

-td, --text-depth=N
Limit text report on directories to depth N. No directories below this level will be shown in the report.
-wd, --web-depth=N
Limit web report on directories to depth N. This hides the contents of any directories below level N. These directories will be shown in green.
-hs, --hide-size=N[bkmg]
Do not display entries using N 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/web report.
-cp, --collapse-path=PATTERN
Hide entries below paths that match PATTERN. 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 CW-cp "/home". Collapsed directories will be shown in green.
-xp, --expand-path=PATTERN
Show only entries below paths that match PATTERN. This allows you to conceal the contents of all directories other than those whose path matches PATTERN. This will obviously only be useful at the first level of directories, since directories below collapsed directories will never be checked. Collapsed directories will be shown in green.
-ns, --nosort
Do not sort results by size. Fairly self-explanatory.
-q, --quiet
Do not produce text output. This stops the creation of a text report, and is useful when you are only interested in the web pages.
-w, --webdir=DIR
Specifiy the directory for html files output. If this option is not given no web pages are produced. This directory must exist and must be writeable.
-sf, --save-file=FILE
Save the results of the scan into this file. Once the directory given on the command line has been scanned and stored in memory, the results are saved to this file. This can then be used later for loading.
-lf, --load-file=FILE
Load the results of a scan from this file. This takes the place of scanning a directory. You can however specify a directory on the command line and durep will attempt to find it within the save file. If it does then the program takes this as the starting directory for the report. This will allow you to generate several different reports from the same save file.
-f, --files
Do not descend into subdirs, only report files. This option will cause durep to skip any directories and only inlcude fiels in its report. This is the only time when filenames are shown.
-x, --one-file-system
Do not traverse file systems. This is similar to the -x option for du. It stops the program traversing filesystems, allowing easy checking of an entire filesystem such as /.
-a, --accessed=N[wdhm]
Only include files accessed in the last N wks/days/hrs/mins (default days). This causes durep to only include files accessed during the specified time.
-m, --modified=N[wdhm]
Only include files modified in the last N wks/days/hrs/mins (default days). This causes durep to only include files modified during the specified time.
-u, --users=USERLIST
Only include files owned by specified users. Any files not owned by a user in this list will be skipped. The users should be seperated by commas.
-xu, --xusers=USERLIST
Exclude files owned by specified users. Any files owned by a user in this list will be skipped. The users should be seperated by commas.
-ep, --exclude-path=PATTERN
Ignore paths that match PATTERN. This works in a smilar manner to CW-cp above except it excludes the directory from the scan itself.

EXAMPLES

1.
CWdurep -w ~/durepweb -td 2 This would print the directory tree starting from the current directory to depth 2 to the console and also create web pages in the directory ~/durepweb (this directory must exist).
2.
CWdurep -f /var/spool/mail This might be useful for keeping a check on the mail directory. The CW-f switch tells durep to just scan files and not descend into directories. Since the CW-w switch is not present, no web pages are produced.
3.
CWdurep -x -cp "/(etc|usr/share)" -ep "/var" / This more complicated version does the following. It scans the root filesystem only, hides the contents of any paths begining /etc or /usr/share and skips the contents of the /var directory.
4.
CWdurep -q -sf durep.save /home This scans /home and saves the results to the save fail durep.save. No text output is produced.
5.
CWdurep -q -w ~/durepweb -lf durep.save /home This reads the save file durep.save and produces a web report from it in the directory ~/durepweb. No text output is produced.

SEE ALSO

du(1), perl(1)

BUGS

It is possible that the disk usage reported is slightly incorrect. See the file BUGS for more details.

AUTHOR

Damian Kramer <psiren@hibernaculum.net>