[Previous] [Contents] [Next]

rcsclean

Clean up working files (UNIX)

Syntax:

rcsclean [options] [file...]

Options:

The rcsclean utility does not follow the standard utility syntax conventions. Options and their arguments may not be separated by white space, and options may not be combined in single command line arguments (i.e. multiple options must be separated by spaces in the command line).

-ksubst
Set the default keyword substitution to subst when retrieving a file for comparison.
-n[rev]
Do not actually remove any files or unlock any revisions. Using this option will tell you what rcsclean would do without actually doing it.
-q
Be quiet; suppress diagnostic output.
-rrev1 [-rrev2]
Specify the revision for comparison.
-T
Preserve the modification time on the RCS file even if the RCS file changes because a lock is removed. This option can suppress extensive recompilation caused by a make dependency of some other copy of the working file on the RCS file. Use this option with care; it can suppress recompilation even when it is needed, i.e. when the lock removal would mean a change to keyword strings in the other working file.
-u[rev]
Unlock the revision if it is locked and no difference is found.
-V
Print the version number.
-Vn
Emulate RCS version n. For details, see the co utility.
-xsuffix
Look at the file in ./RCS/suffix*
-zzone
Set the default timezone to zone.
file
The pathname of a file.

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 RCS file. If it finds no difference, it removes the working file unless the working file is writable and the revision is locked. If the revision is locked, it unlocks the revision.

If no file is given, all working files in the current directory are cleaned. Any other options are passed along to rcsdiff for the comparison.

The rcsclean command is useful for clean targets in Makefiles. See also rcsdiff, which prints out the differences, and ci, which normally asks whether to check in a file if it wasn't changed.

Examples:

Remove all working files in the current directory that weren't changed since their checkout:

    rcsclean

Remove all working files ending in .c or .h that weren't changed since their checkout:

    rcsclean *.c *.h

Exit status:

0
No differences were found for any file under RCS control.
1
Differences were found.
2
An error occurred.

Contributing author:

GNU

Caveats:

You can't give RCS filenames as arguments.

Any diagnostics generated by rcsdiff when comparing files are discarded.

If the latest revision is already unlocked, and you have a lock on an earlier revision, the earlier revision is unlocked.

See also:

ci, co, ident, rcs, rcsdiff, rcsmerge, rlog

Don Bolinger & Tan Bronson, Applying RCS & SCCS, O'Reilly and Associates, 1995.


[Previous] [Contents] [Next]