HP-UX Reference (11i v1 00/12) - 1M System Administration Commands A-M (vol 3)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1m/!!!intro.1m
________________________________________________________________
___ ___
f
freedisk(1M) freedisk(1M)
NAME
freedisk - recover disk space
SYNOPSIS
freedisk [-a n][-v ]
DESCRIPTION
The freedisk command is an interactive script that finds and optionally removes filesets that do not
appear to have been used since they were originally installed by swinstall (see swinstall(1M)). NOTE:
Familiarity with swremove (see swremove(1M)) is required for successful use of this tool.
The freedisk command has two phases, any combination of which can be executed or skipped.
The first phase analyzes the regular files in all filesets to discover filesets that have remained unused since
installation. Use the -a option to specify a usage time other than ‘‘since installation.’’
Filesets that appear to be entirely unused, but which are dependencies of other filesets that are in use, are
treated by freedisk as though they were ‘‘in use’’ and are not presented as candidates for removal.
At the end of the first phase, the
swremove command is invoked interactively with the filesets that are
candidates for removal already selected. During the
swremove
session any, all, or none of the pre-
selected filesets can be removed.
The second phase of
freedisk optionally removes filesets that are used only for building kernels. These
filesets are identified by containing a control file named freedisk_rmvbl
. This removal occurs regard-
less of when the filesets were last used. This phase should be executed only if you are sure you will not
need to rebuild a kernel for any reason. The interactive interface provides more information on this capa-
bility.
You can reload kernel build filesets removed during this phase by using
/var/adm/sw/krn_rmvd.log
as the argument to the -f option of swinstall .
Options
freedisk supports the following options:
-a n Check access of files only in the previous n days instead of the default of checking
access since the fileset installation date. The n value should be a positive integer. It
is passed to
find (see find(1)) as -atime -n.
-v Provide very verbose output. Useful when detailed information is required as to
which specific files have been used in each fileset.
If you prefer to track the operation of the utility in a scrollable and easily viewable
form, redirect the output to a file (see the example below) and use an editor on that
file.
RETURN VALUE
The following are exit values of freedisk:
0 Successful completion.
1 One or more critical errors occurred.
DIAGNOSTICS
Error messages are self-explanatory.
EXAMPLES
Use the verbose option of freedisk to identify individual files used in each fileset and keep a copy of the
output in a file for later use:
/opt/contrib/bin/freedisk -v 2>&1 | tee filename
Find filesets that have not been used in the past 90 days:
/opt/contrib/bin/freedisk -a 90
WARNINGS
Removing the kernel build filesets in phase two can result in unresolved fileset dependencies. This means
that swverify (see swverify(1M)) will indicate errors, unless the appropriate options are used to ignore
missing dependencies.
HP-UX Release 11i: December 2000 − 1 − Section 1M−−239
___
___