.TH PURGESF 1csound CARL 
.SH NAME
purgesf 
- lists csound files which are ripe to be deleted
.SH SYNOPSIS
.B purgesf 
[flags] directory
.RS .5i
.nf
flags:
 -S  lists scratch files that can be deleted
 -H  lists hold files that can be deleted
     if neither -S nor -H is given, list both
 -l  long form listing
 -D  sorts by referenced date, oldest first
 -tN lists files unreferenced for more than N hours
 -n  only prints number of cylinders reclaimable
 -U  lists users affected by purge
 -N  uses "notify" format
 -dN day N (N == # days in future) included in purge note with -N
.RE
.SH DESCRIPTION
.B purgesf 
nominates files to be removed so as to free
up working space on a sound file system.  It can be used in conjunction
with 
.B reapsf(1carl)
and
.B dumpsf(1carl)
to manage the culling and cold storing of the nominated files.
.PP
.B purgesf
lists files that have been unreferenced for more than certain thresholds
of time.  Default time thresholds are set by the 
.I csound
file system manager.  
Other time thresholds can be set via flags.
.B purgesf
merely reports lists of files that satisfy certain criteria, it
does not actually delete anything, and has no side effects.
.PP
If either the \fB-S\fP or \fB-H\fP flags are used, 
only files in that category that have exceed their reference threshold
will be listed.
The threshold can be modified with the
.B -tN
flag where 
.B N
is is the number of hours a file must have been unreferenced in order
to be listed.
If neither \fB-S\fP or \fB-H\fP flags are supplied, 
.B purgesf
first lists all \fIScratch\fP files, then all \fBHold\fP files that exceed 
their reference thresholds.  (In this case, the \fB-t\fP flag is ignored.)
.PP
The
.B -S
and
.B -H
flags cause two actions each: 
.IP -S
the age threshold is adjusted to 24 hours, and only files with 
.I Scratch 
mode classification are nominated.  (If a
.B -tN
flag has also been given, its threshold overrides that of the default.)
.IP -H
the age threshold is adjusted to 96 hours (4 days), and only files with 
.I Hold 
mode classification are nominated.  (Again, a 
.B -tN
specification overrides the default, only when one or the other is given.)
.PP
Ordinarily, the files are sorted by user.  They can be sorted by date,
longest-unreferenced-file first, by including the
.B -D
flag.
.PP
A "long form" listing of the files
may be obtained by adding the
.B -l
flag.
This produces the filename, size in cylinders, the kind of file (S == Scratch,
H == Hold), and its last referenced date.
This also generates a line at the bottom of the listing indicating
the total reclaimable cylinders.
.PP
The 
.B -n
flag suppresses all but the listing of the total reclaimable cylinders.
.PP
The
.B -u
flag lists the names of the users whose files have been nominated by
.B purgesf.
.PP
The
.B -N
flag
causes the output to be suitable to be mailed to the users whose files
have been named.  The message header is
.RS .5i
\fIThe following sound files have been unreferenced since\fR:
(date specified by threshold)
\fIand are therefor subject to purging\fR.
.RE
Then all the nominated files are listed.
.PP
The
.B -dN
flag takes 
.B N
as the number of days in the future when a purge will be done.
When used in conjunction with 
.B -N,
the message header is augmented with the lines:
.RS .5i
\fIThe purge is scheduled for\fR:
(date of purge)
.RE
.SH AUTHOR
Gareth Loy
.SH SEE ALSO
sndin(1csound), sndout(1csound).
