[net.sources] squish.8

smk (12/26/82)

.TH SQUISH 8
.UC 4
.SH NAME
squish  \- compact directories
.SH SYNOPSIS
.B squish
[
.B \-r
] [
.B \-v
] dirname ...
.SH DESCRIPTION
.I Squish
removes the unused entries in directories.
UNIX does not have any other facility for performing this
function.
Without
.I squish,
directories do not shrink when files are deleted from the
directory.
Rather, the entries in the directory are zeroed out, and
remain in the directory as dead space.
By using
.I squish,
all unused entries in the directory will be deleted, and
the actual size of the directory decreases.
.PP
When many files are deleted from a large directory,
there is wasted space due to the zeroed entries.
This problem is extremely troublesome in cases where such a
directory is used very frequently.
In many cases, indirect blocks have to be searched and performance
of the system as a whole suffers while this is occurring.
.PP
.I Squish
takes directories as arguments.
The directory names must be full pathnames, with no component
being `.' or `..' or contain multiple successive `/'.
These rules, far from being foolproof, help prevent specifying
a directory at or above the current directory.
Similarly, directories cannot be specified that contain
(somewhere within them) a mountable file system as specified
in the
.IR fstab (5)
file.
Because of the special
.IR link (2)
and
.IR unlink (2)
operations performed on directories,
.I squish
may only be run by the superuser.
.PP
The access and modify times for directories involved in the squishing are
updated.
The access and modify times for other files involved
are not altered.
Likewise, the owner, group, and mode of all files concerned remain
the same.
.PP
The
.B \-r
flag specifies that
.I squish
be performed recursively on subdirectories found under
the main directory specified in the command line.
Normally, only
the main directory
is squished.
.PP
The
.B \-v
flag turns on verbose mode.
All directories squished are reported.
Also, all valid files that have to be shuffled are output.
.SH FILES
.ta 2i
squish\fIX\fR.\fInnnnnn\fR	temporary directory at recursive level \fIX\fR
.SH "SEE ALSO"
mkdir(1), rm(1), chdir (2), link(2), unlink(2), fstab(5), ndir(5L)
.SH BUGS
If any process is active in a directory being squished, there
may be unpredictable results.
(Only the kernel can detect such cases.)
It is best to run
.I squish
on a quiet system.
.PP
Like
.IR mkdir (1),
.I squish
performs functions that should be done in the kernel.
There are short periods of time in both commands where the file system is
in an unclean state.
.SH AUTHOR
Steven M. Kramer