rcsclean(1) CLIX rcsclean(1)
NAME
rcsclean - Cleans up working RCS files
SYNOPSIS
rcsclean [flags] [file ...]
FLAGS
-k subst
Uses subst style keyword substitution when retrieving the revision
for comparison. See co(1) for more information.
-n[rev] Does not actually remove any files or unlock any revisions. This
flag shows what rcsclean would do without actually doing it.
-q (Quiet mode.) Suppresses diagnostics.
-rrev Specifies the revision to compare the working file to.
-u[rev] Unlocks the revision, if it is locked and no difference is found.
-Vn Emulates RCS version n, where n may be 3, 4, or 5. This may be
useful when interchanging RCS files with others who are running
older versions of RCS. To see which version of RCS others are
running, have them use the rlog command on an RCS file; if none of
the first few lines of output contain the string branch: it is
version 3; if the dates' years have just two digits, it is
version 4; otherwise, it is version 5. An RCS file generated
while emulating version 3 will lose its default branch. An RCS
revision generated while emulating version 4 or earlier will have
a timestamp that is off by up to 13 hours. A revision extracted
while emulating version 4 or earlier will contain dates of the
form yy/mm/dd instead of yyyy/mm/dd and may also contain different
white space in the substitution for $Log$.
-x suffixes
Uses suffixes to characterize RCS files. A non-empty suffix
matches any pathname ending in the suffix. An empty suffix
matches any pathname of the form RCS/file or path/RCS/file. The
-x flag can specify a list of suffixes separated by a slash (/).
For example, -x,v/ specifies two suffixes: ,v and the empty
suffix. If two or more suffixes are specified, they are tried in
order when looking for a RCS file; the first one that works is
used for that file. If no RCS file is found but an RCS file can
be created, the suffixes are tried in order to determine the new
RCS file's name. The default for suffixes is installation-
dependent; normally it is ,v/ for hosts like UNIX that permit
commas in file names, and is empty (the empty suffix) for other
hosts.
2/94 - Intergraph Corporation 1
rcsclean(1) CLIX rcsclean(1)
DESCRIPTION
The rcsclean command removes working files that were checked out and never
modified. For each file given, rcsclean compares the working file and a
revision in the corresponding Revision Control System (RCS) file. If it
finds a difference, it does nothing. If no difference is found, it first
unlocks the revision (if the -u flag is specified), and then removes the
working file unless the working file is writable and the revision is
locked. The rcsclean command logs its actions by printing the
corresponding rcs -u and rm -f command on stdout.
If no file is given, all working files in the current directory are
cleaned. Pathnames matching an RCS suffix denote RCS files; all others
denote working files. Names are paired as explained in ci(1).
The number of the revision to which the working file is compared may be
attached to the -n, -q, -r, or -u flags. If no revision number is
specified, and if the -u flag is given and the caller has one revision
locked, rcsclean uses that revision; otherwise, rcsclean compares the
working file to the latest revision on the default branch (normally the
highest branch on the trunk).
The rcsclean command is useful for ``clean'' targets in makefiles. Note
that rcsdiff displays the differences. Also, ci normally asks whether to
check in a file if it was not changed.
Environment Variables
The following environment variable can be useful with RCS:
RCSINIT Specifies options prepended to the argument list, separated by
spaces. A backslash escapes spaces within an option. The
RCSINIT options are prepended to the argument lists of most RCS
commands. Useful RCSINIT options include -q, -V, and -x.
EXAMPLES
The following command removes all working files ending in .c or .h that
were not changed since their checkout.
rcsclean *.c *.h
FILES
/tmp/,RCSt1xxxxxx Temporary file.
CAUTIONS
At least one file must be given in older UNIX versions that do not provide
the needed directory scanning operations.
2 Intergraph Corporation - 2/94
rcsclean(1) CLIX rcsclean(1)
EXIT VALUES
The exit value is 0 if there were no differences during the last
comparison or if the last working file did not exist, 1 if there were
differences, and 2 if there were errors.
RELATED INFORMATION
Commands: co(1), ci(1), ident(1), rcs(1), rcsdiff(1), rcsmerge(1),
rlog(1)
Files: rcsfile(4)
Walter F. Tichy, ``Design, Implementation, and Evaluation of a Revision
Control System,'' in Proceedings of the 6th International Conference on
Software Engineering, IEEE, Tokyo, Sept. 1982
Walter F. Tichy, ``RCS--A System for Version Control,'' Software--
Practice & Experience, 15, 7 (July 1985), pp. 637-654.
2/94 - Intergraph Corporation 3