.TH REAPSF 1csound CARL 
.SH NAME
reapsf 
- reclaim temporarily used sound file space
.SH SYNOPSIS
.B reapsf 
[flags] filesystem
.RS .5i
.nf
flags:
 -CN delete Scratch files first, then Hold files, as needed
	to reclaim N cylinders (default flag)
 -SN only delete Scratch files as needed to reclaim N cylinders
 -HN only delete Hold files as needed to reclaim N cylinders (reserved)
 -y  answer yes to all questions (reserved)
 -t  test, do not delete files
.RE
.SH DESCRIPTION
.B reapsf 
reclaims temporarily used file space from the named sound file system.
.PP
There are two classes of reclaimable file space: Scratch and
Hold sound files.  A third class, Keep files, are unreclaimable by
.B reapsf.
.PP
The normal operation 
is to use the \-C flag to specify a quantity of space to reclaim.
.B reapsf will first try to delete Scratch files to free that much space.
If it does not find enough that way, it will ask you if you want to 
reap Hold files for the remainder.  If you answer anything other than
"y" or "yes", only Scratch files will be removed.
If you specify no flags, the default is to invoke \-C, and specify the
size of the sound file system as the number of cylinders to reclaim,
which frees the maximum space on the disk that is available.
.PP
It is possible to select only one class for reaping with the \-S and \-H
flags.
Specify to 
.B reapsf
the class of files to
be removed and the quantity of space in cylinders to be freed.
For instance, the flag
.B -S10
specifies 10 cylinders to be reclaimed by deleting Scratch files.
The flag
.B -H10
does the same to Hold files.
(Note: \-H is a reserved flag, only wizards may delete Hold files without
first deleting Scratch files.)
.SH Implementation
The method used by the \-C flag to
.B reapsf
is to make a list of files in the Scratch category, beginning with
oldest Scratch files first, that have exceeded the Scratch file threshold.
The list is terminated when the total cylinders exceeds the amount requested.
If the amount requested is not achieved by removing all candidate Scratch
files, you are asked if you wish to reap Hold files for the remainder.
If you say yes, the same procedure is invoked for Hold files until the
requested amount is reached or all candidate Hold files are tallied.
The combined list of files is then deleted.
.PP
Age is determined by the last time the file was 
.B referenced 
by anyone.  
The reference time is the last time an operation, such as 
.I sndin(1csound)
or
.I sndout(1csound)
was performed on a file.
For 
.I sndout
in particular, the reference time is the time at which 
.I sndout
closes the file, not when it is created.
.PP
At CARL,
Scratch files unreferenced for more than 24 hours, and Hold files
unreferenced for more than four days, are reclaimable.
.SH Usage
When you need more space for your work than is currently available, the
method to get more is to first examine your own file usage.  Remove
any files that you know will not be of further use to you.  
If you are unable to delete enough files, then put some on magtape, or
(if you have such an option) on another disk.
Only when you have tried to solve your own problem should you run
.B reapsf.
Use the \-C flag to
remove scratch files first. Then, if that does
not supply enough, remove hold files.
.SH Note
It is possible, and even encouraged, for anyone to run reapsf at
any time, on Scratch as well as Hold files, requesting as much space as
they legitimately need to do their work.  
.B reapsf 
will 
.I not 
delete files that have not exceeded the aging thresholds.
.SH BUGS
.B reapsf
is a feeble attempt to enforce by administrative means that which can
only be solved by a network of social interaction between users.
There are two principal
abuses of this program: either by maliciously protecting your files from
being subject to 
.B reapsf
or by maliciously reaping other's files when you know they are valuable
and not backed up.  If ever there were a program that depended on
the Golden Rule, this is it.
.SH AUTHOR
Gareth Loy
.SH SEE ALSO
scratchsf(1csound),
holdsf(1csound),
keepsf(1csound),
purgesf(1csound), rmsf(1csound),
dumpsf(1csound), restorsf(1csound).
