rcsclean.1 revision 256198
1259698Sdim.de Id 2259698Sdim.ds Rv \\$3 3259698Sdim.ds Dt \\$4 4259698Sdim.. 5259698Sdim.Id $FreeBSD: head/gnu/usr.bin/rcs/rcsclean/rcsclean.1 50472 1999-08-27 23:37:10Z peter $ 6259698Sdim.ds r \&\s-1RCS\s0 7259698Sdim.if n .ds - \%-- 8259698Sdim.if t .ds - \(em 9259698Sdim.TH RCSCLEAN 1 \*(Dt GNU 10259698Sdim.SH NAME 11259698Sdimrcsclean \- clean up working files 12259698Sdim.SH SYNOPSIS 13259698Sdim.B rcsclean 14259698Sdim.RI [ options "] [ " file " .\|.\|. ]" 15259698Sdim.SH DESCRIPTION 16259698Sdim.B rcsclean 17259698Sdimremoves files that are not being worked on. 18259698Sdim.B "rcsclean \-u" 19259698Sdimalso unlocks and removes files that are being worked on 20259698Sdimbut have not changed. 21259698Sdim.PP 22259698SdimFor each 23259698Sdim.I file 24259698Sdimgiven, 25259698Sdim.B rcsclean 26259698Sdimcompares the working file and a revision in the corresponding 27259698Sdim\*r file. If it finds a difference, it does nothing. 28259698SdimOtherwise, it first unlocks the revision if the 29259698Sdim.B \-u 30259698Sdimoption is given, 31259698Sdimand then removes the working file 32259698Sdimunless the working file is writable and the revision is locked. 33259698SdimIt logs its actions by outputting the corresponding 34259698Sdim.B "rcs \-u" 35259698Sdimand 36259698Sdim.B "rm \-f" 37259698Sdimcommands on the standard output. 38259698Sdim.PP 39259698SdimFiles are paired as explained in 40259698Sdim.BR ci (1). 41259698SdimIf no 42259698Sdim.I file 43259698Sdimis given, all working files in the current directory are cleaned. 44259698SdimPathnames matching an \*r suffix denote \*r files; 45259698Sdimall others denote working files. 46259698Sdim.PP 47259698SdimThe number of the revision to which the working file is compared 48259698Sdimmay be attached to any of the options 49259698Sdim.BR \-n , 50259698Sdim.BR \-q , 51259698Sdim.BR \-r , 52259698Sdimor 53259698Sdim.BR \-u . 54259698SdimIf no revision number is specified, then if the 55259698Sdim.B \-u 56259698Sdimoption is given and the caller has one revision locked, 57259698Sdim.B rcsclean 58259698Sdimuses that revision; otherwise 59259698Sdim.B rcsclean 60259698Sdimuses the latest revision on the default branch, normally the root. 61259698Sdim.PP 62259698Sdim.B rcsclean 63259698Sdimis useful for 64259698Sdim.B clean 65259698Sdimtargets in makefiles. 66259698SdimSee also 67259698Sdim.BR rcsdiff (1), 68259698Sdimwhich prints out the differences, 69259698Sdimand 70259698Sdim.BR ci (1), 71259698Sdimwhich 72259698Sdimnormally reverts to the previous revision 73259698Sdimif a file was not changed. 74259698Sdim.SH OPTIONS 75259698Sdim.TP 76259698Sdim.BI \-k subst 77259698SdimUse 78259698Sdim.I subst 79259698Sdimstyle keyword substitution when retrieving the revision for comparison. 80259698SdimSee 81259698Sdim.BR co (1) 82259698Sdimfor details. 83259698Sdim.TP 84259698Sdim.BR \-n [\f2rev\fP] 85259698SdimDo not actually remove any files or unlock any revisions. 86259698SdimUsing this option will tell you what 87259698Sdim.B rcsclean 88259698Sdimwould do without actually doing it. 89259698Sdim.TP 90259698Sdim.BR \-q [\f2rev\fP] 91259698SdimDo not log the actions taken on standard output. 92259698Sdim.TP 93259698Sdim.BR \-r [\f2rev\fP] 94259698SdimThis option has no effect other than specifying the revision for comparison. 95259698Sdim.TP 96259698Sdim.B \-T 97259698SdimPreserve the modification time on the \*r file 98259698Sdimeven if the \*r file changes because a lock is removed. 99259698SdimThis option can suppress extensive recompilation caused by a 100259698Sdim.BR make (1) 101259698Sdimdependency of some other copy of the working file on the \*r file. 102259698SdimUse this option with care; it can suppress recompilation even when it is needed, 103259698Sdimi.e. when the lock removal 104259698Sdimwould mean a change to keyword strings in the other working file. 105259698Sdim.TP 106259698Sdim.BR \-u [\f2rev\fP] 107259698SdimUnlock the revision if it is locked and no difference is found. 108259698Sdim.TP 109259698Sdim.BI \-V 110259698SdimPrint \*r's version number. 111259698Sdim.TP 112259698Sdim.BI \-V n 113259698SdimEmulate \*r version 114259698Sdim.IR n . 115259698SdimSee 116259698Sdim.BR co (1) 117259698Sdimfor details. 118259698Sdim.TP 119259698Sdim.BI \-x "suffixes" 120259698SdimUse 121259698Sdim.I suffixes 122259698Sdimto characterize \*r files. 123259698SdimSee 124259698Sdim.BR ci (1) 125259698Sdimfor details. 126259698Sdim.TP 127259698Sdim.BI \-z zone 128259698SdimUse 129259698Sdim.I zone 130259698Sdimas the time zone for keyword substitution; 131259698Sdimsee 132259698Sdim.BR co (1) 133259698Sdimfor details. 134259698Sdim.SH EXAMPLES 135259698Sdim.LP 136259698Sdim.RS 137259698Sdim.ft 3 138259698Sdimrcsclean *.c *.h 139259698Sdim.ft 140259698Sdim.RE 141259698Sdim.LP 142259698Sdimremoves all working files ending in 143259698Sdim.B .c 144259698Sdimor 145259698Sdim.B .h 146259698Sdimthat were not changed 147259698Sdimsince their checkout. 148259698Sdim.LP 149259698Sdim.RS 150259698Sdim.ft 3 151259698Sdimrcsclean 152259698Sdim.ft 153259698Sdim.RE 154259698Sdim.LP 155259698Sdimremoves all working files in the current directory 156259698Sdimthat were not changed since their checkout. 157259698Sdim.SH FILES 158259698Sdim.B rcsclean 159259698Sdimaccesses files much as 160259698Sdim.BR ci (1) 161259698Sdimdoes. 162259698Sdim.SH ENVIRONMENT 163259698Sdim.TP 164259698Sdim.B \s-1RCSINIT\s0 165259698Sdimoptions prepended to the argument list, separated by spaces. 166259698SdimA backslash escapes spaces within an option. 167259698SdimThe 168259698Sdim.B \s-1RCSINIT\s0 169259698Sdimoptions are prepended to the argument lists of most \*r commands. 170259698SdimUseful 171259698Sdim.B \s-1RCSINIT\s0 172259698Sdimoptions include 173259698Sdim.BR \-q , 174259698Sdim.BR \-V , 175259698Sdim.BR \-x , 176259698Sdimand 177259698Sdim.BR \-z . 178259698Sdim.SH DIAGNOSTICS 179259698SdimThe exit status is zero if and only if all operations were successful. 180259698SdimMissing working files and \*r files are silently ignored. 181259698Sdim.SH IDENTIFICATION 182259698SdimAuthor: Walter F. Tichy. 183259698Sdim.br 184259698SdimManual Page Revision: \*(Rv; Release Date: \*(Dt. 185259698Sdim.br 186259698SdimCopyright \(co 1982, 1988, 1989 Walter F. Tichy. 187259698Sdim.br 188259698SdimCopyright \(co 1990, 1991, 1992, 1993 Paul Eggert. 189259698Sdim.SH "SEE ALSO" 190259698Sdimci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1), 191259698Sdimrcsfile(5) 192259698Sdim.br 193259698SdimWalter F. Tichy, 194259698Sdim\*r\*-A System for Version Control, 195259698Sdim.I "Software\*-Practice & Experience" 196259698Sdim.BR 15 , 197259698Sdim7 (July 1985), 637-654. 198259698Sdim.SH BUGS 199259698SdimAt least one 200259698Sdim.I file 201259698Sdimmust be given in older Unix versions that 202259698Sdimdo not provide the needed directory scanning operations. 203259698Sdim.br 204259698Sdim