.TH SCRATCHSF 1csound CARL 
.SH NAME
scratchsf - holdsf - keepsf 
- set volatility status of files.
.SH SYNOPSIS
.B scratchsf
filename
.br
.B holdsf
filename
.br
.B keepsf
filename
.SH RATIONALE
On the UNIX file system, once a file is created it can only be deleted
by its author, unless special permission has been granted by the author
to the author's group or to
others, or by the superuser.  While this is suitable for general purpose
file systems, it has special liabilities in such cases as the sound file
system where a limited data storage area must be equitably shared, and where
much of the data can be recreated at will, making absolute
permanance much less desirable.
.PP
To this end, the sound file system implements a system which 
attempts to maximize the availability of free storage space for temporary
use, and makes it harder to use the file system for permanent storage
of sound.
The sound file system supports three classes of volatility, designated 
.I Keep,
.I Hold, 
and 
.I Scratch.  
.I Scratch 
files have a guaranteed lifetime of one day.
.I Hold 
files have a guaranteed lifetime of seven (7) days.
.I Keep 
files are not deleted, but they still may be dumped to magtape
and purged if circumstances warrant.  Depending on the weight of space
usage, 
.I Scratch 
and 
.I Hold 
files may last considerably longer than the
minimum time.  It is anticipated that 
.I Hold 
files will be fairly long lived.
.PP
New sound files always start out life as 
.I Scratch 
files, and must be
promoted to 
.I Hold 
or 
.I Keep 
status.  
Once you audition a file and decide you like it, you then
put it on 
.I Hold 
status.  
.I Keep 
status is reserved for finished pieces,
some demos, and other files that have received official blessing to
have such status (Holy water is sprinkled and incense is burned...)
The rule-of-thumb is: the harder it would be to recreate a sound
file, the less volatile should be its keep status.
.PP
The mechanism for reclaiming space from 
.I Scratch 
and 
.I Hold 
files is to
delete the oldest 
.I Scratch 
files first. Then, when all the
.I Scratch 
files
that can be deleted are gone, the same procedure is done on 
.I Hold
files.  Age of a file is determined by the last time the file was 
referenced.  Thus, 
.I Scratch 
files may only be reclaimed one day after the 
time they were last referenced.  
.I Hold 
files will last 7 days after their
last reference.
.PP
.SH DESCRIPTION
When a file is created by 
.B record, 
.B cpsf, 
.B catsf 
or 
.B sndout, 
its class is
set to 
.I scratch.
For example,
the sequence:
.RS .5i
.nf
	% wave | sndout test
	% holdsf test
.fi
.RE
will preserve test for a minimum of 7 days after the last time it is
referenced.
Any number of files can be named to each command.
.PP
The copy of a file created with
.B cpsf
is set to
.I Scratch
mode.
Renaming a file with 
.B mvsf
keeps its former classification.  Likewise, 
restoring a file from magtape via 
.B restorsf 
carries over its old classification.
.PP
To observe the classification of a file, use the 
.RS .5i
	% lsf -l file 
.RE
command, and look under the field marked ``sc''; 
the mode will be either `S', `H' or `K'.
Or use the
.RS .5i
	% lsf -f file 
.RE
command and look below the field marked 
.I HOLD.  
It will be 
.I 'S' 
for 
.I Scratch,
.I 'H' 
for 
.I Hold 
and 
.I 'K' 
for 
.I Keep.
.SH RECLAIMING FILE SPACE
File space is reclaimed by the program
.B reapsf(1csound).
See the manual page for that program.
.PP
NOTE: It is possible, and even encouraged, for anyone to run reapsf at
any time, on 
.I Scratch 
as well as 
.I Hold 
files, requesting as much space as
they legitimately need to do their work.  
.B reapsf 
will not delete files
that have not exceeded the time thresholds.
.SH AUTHOR
Gareth Loy
.SH SEE ALSO
reapsf(1csound), purgesf(1csound), rmsf(1csound),
lsf(1csound), dumpsf(1csound), restorsf(1csound).
