rcsclean.1 revision 9
1.de Id
2.ds Rv \\$3
3.ds Dt \\$4
4..
5.Id $Id: rcsclean.1,v 1.8 1991/11/03 01:09:19 eggert Exp $
6.ds r \&\s-1RCS\s0
7.if n .ds - \%--
8.if t .ds - \(em
9.TH RCSCLEAN 1 \*(Dt GNU
10.SH NAME
11rcsclean \- clean up working files
12.SH SYNOPSIS
13.B rcsclean
14.RI [ options "] [ " file " .\|.\|. ]"
15.SH DESCRIPTION
16.B rcsclean
17removes working files that were checked out and never modified.
18For each
19.I file
20given,
21.B rcsclean
22compares the working file and a revision in the corresponding
23\*r file.  If it finds a difference, it does nothing.
24Otherwise, it first unlocks the revision if the
25.B \-u
26option is given,
27and then removes the working file
28unless the working file is writable and the revision is locked.
29It logs its actions by outputting the corresponding
30.B "rcs \-u"
31and
32.B "rm \-f"
33commands on the standard output.
34.PP
35If no
36.I file
37is given, all working files in the current directory are cleaned.
38Pathnames matching an \*r suffix denote \*r files;
39all others denote working files.
40Names are paired as explained in
41.BR ci (1).
42.PP
43The number of the revision to which the working file is compared
44may be attached to any of the options
45.BR \-n ,
46.BR \-q ,
47.BR \-r ,
48or
49.BR \-u .
50If no revision number is specified, then if the
51.B \-u
52option is given and the caller has one revision locked,
53.B rcsclean
54uses that revision; otherwise
55.B rcsclean
56uses the latest revision on the default branch, normally the root.
57.PP
58.B rcsclean
59is useful for
60.B clean
61targets in Makefiles.
62See also
63.BR rcsdiff (1),
64which prints out the differences,
65and
66.BR ci (1),
67which
68normally asks whether to check in a file
69if it was not changed.
70.SH OPTIONS
71.TP
72.BI \-k subst
73Use
74.I subst
75style keyword substitution when retrieving the revision for comparison.
76See
77.BR co (1)
78for details.
79.TP
80.BR \-n [\f2rev\fP]
81Do not actually remove any files or unlock any revisions.
82Using this option will tell you what
83.B rcsclean
84would do without actually doing it.
85.TP
86.BR \-q [\f2rev\fP]
87Do not log the actions taken on standard output.
88.TP
89.BR \-r [\f2rev\fP]
90This option has no effect other than specifying the revision for comparison.
91.TP
92.BR \-u [\f2rev\fP]
93Unlock the revision if it is locked and no difference is found.
94.TP
95.BI \-V n
96Emulate \*r version
97.IR n .
98See
99.BR co (1)
100for details.
101.TP
102.BI \-x "suffixes"
103Use
104.I suffixes
105to characterize \*r files.
106See
107.BR ci (1)
108for details.
109.SH EXAMPLES
110.LP
111.RS
112.ft 3
113rcsclean  *.c  *.h
114.ft
115.RE
116.LP
117removes all working files ending in
118.B .c
119or
120.B .h
121that were not changed
122since their checkout.
123.LP
124.RS
125.ft 3
126rcsclean
127.ft
128.RE
129.LP
130removes all working files in the current directory
131that were not changed since their checkout.
132.SH FILES
133.B rcsclean
134accesses files much as
135.BR ci (1)
136does.
137.SH ENVIRONMENT
138.TP
139.B \s-1RCSINIT\s0
140options prepended to the argument list, separated by spaces.
141A backslash escapes spaces within an option.
142The
143.B \s-1RCSINIT\s0
144options are prepended to the argument lists of most \*r commands.
145Useful
146.B \s-1RCSINIT\s0
147options include
148.BR \-q ,
149.BR \-V ,
150and
151.BR \-x .
152.SH DIAGNOSTICS
153The exit status is zero if and only if all operations were successful.
154Missing working files and \*r files are silently ignored.
155.SH IDENTIFICATION
156Author: Walter F. Tichy.
157.br
158Revision Number: \*(Rv; Release Date: \*(Dt.
159.br
160Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
161.br
162Copyright \(co 1990, 1991 by Paul Eggert.
163.SH "SEE ALSO"
164ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1),
165rcsfile(5)
166.br
167Walter F. Tichy,
168\*r\*-A System for Version Control,
169.I "Software\*-Practice & Experience"
170.BR 15 ,
1717 (July 1985), 637-654.
172.SH BUGS
173At least one
174.I file
175must be given in older Unix versions that
176do not provide the needed directory scanning operations.
177.br
178