NAME

fs-report - size report program


SYNOPSIS

fs-report [options...] [directory]

Gives a report of files system space in order to glean why a filesystem might be full.

If no directory is given use the current directory `.'.


DESCRIPTION

Gives a report of files system space in order to glean why a filesystem might be full. The report is in a number of sections: ``core files'', ``largest files and directories'', ``files created recently'', the intersection of the latter two sections, and just a listing of what is in the directory. Any or all of these sections may be omitted from the report.

``Core'' files are created automatically when a program crashes. Their usefulness is often short-lived, in getting a stack trace and perhaps looking at some variables when the program died. It is not uncommon that they get created when a program crashes and are subsequently never used or used once and forgotten about. Since the core file contains information about all of the variables in use when a program died it is not uncommon for large programs to produce large core files.

The section on ``largest files and directories'' suggests what might be removed to give the most space back. fs-report takes care to line up the magnitude of the file sizes in columns to make it easier to read.

Often what tipped a filesystem over the edge are the files that were recently created. So there is a section showing which files are new.

After this we take the common files between what is large and what is new. When something is listed here, it is often the culpret of why a filesystem recently filled up.

Finally there is just a good ol' ``ls'' (turned off by default). Some people find this useful.

OPTIONS

--help

Give rudimentary help and exit

--version

show a CVS version string and exit

--debug integer

give debugging output. The higher the number, the more the output. Default is no debug information (0).

--size-lines integer

Maximum number of lines output in the ``largest files'' section.

--newest-lines integer

Maximum number of lines given in the ``newest files'' section.

--ls-lines integer

Maximum number of lines given in the top-level directory list section.

--lines n

Maximum number of lines if no other limit is specified.

--du path-to-du-program

Set program to use for running du. The default is /usr/bin/du.

--find path-to-find-program

Set program to use for running ``find''. The default is /usr/bin/find.

--ls | --nols

Show computing ``list files'' section. To omit this section (the default) use --no-ls.

--size | --nosize

Show computing ``largest files'' section. To omit this section use --no-size.

For this section to work, a suitable ``du'' program must have been set or automatically configured.

--core | --nocore

Show a list of the``core files'' that appear in this directory or a subdirectory of this directory. To omit this section use --nocore.

For this section to work, a suitable ``find'' program must have been set or automatically configured.

--newest | --nonewest

Show computing ``newest files'' section. To omit this section use --no-newest.

--common | --nocommon

Compute the common files that are both ``new'' and ``large''. To omit this section use --nocommon.

--file-time hours

Set the file time for files listed in the ``newest files'' section. This also has an effect on the files in the common section.

--find-time string

Set the test used by ``find'' in the ``newest files'' section. The default is -cmin, but other possibilites include (assuming your ``find'' supports it:

-atime

To set if file access is more recent than the value set by --file-time (or its default value)

-anewer file

To set if a file access is more recent than file.

-cnewer file

To set if a file status changed more recently than file.

-ctime

To set if a file status is more recent than the value set by --file-time (or its default value).

-mtime (modification time)

To set if file's data was modified more recently than the value set by --file-time (or its default value).

-newer file

To set if the file was modified more recently than file.


BUGS

We probably need to do better with dealing with different du commands and GNU find options.


SEE ALSO

My log rotation program http://recycle-logs.sourceforge.net and file removal/archival program http://rm-old-files.sourceforge.net might assist in maintenance the filesystem so it doesn't fill up.


AUTHOR

The current version is maintained (or not) by rocky@cpan.org.


COPYRIGHT

  Copyright (C) 2004, 2005, 2006 Rocky Bernstein, email:
  <rocky@cpan.org>.
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  You should have received a copy of the GNU General Public License
  along with GNU Make; see the file COPYING.  If not, write to the
  Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  MA 02110-1301 USA.  You should have received a copy of the GNU
  General Public License

$Id: fs-report.in,v 1.17 2005/09/07 02:18:57 rockyb Exp $