Normally, you maintain RCS files in a subdirectory called
so the first step in using RCS should be:
Next, you place an existing file (or files) under RCS control
by running the check-in command:
This creates a file called
is called an RCS file, and it will store all future revisions
. When you run
on a file for the first time,
you are prompted to describe the contents.
into the RCS file as revision 1.1.
To edit a new revision, check out a copy:
This causes RCS to extract a copy of
from the RCS file.
You must lock the file with
to make it writable by you.
This copy is called a working file. When you're done editing,
you can record the changes by checking the working file back in again:
This time, you are prompted to enter a log of the changes made, and
the file is deposited as revision 1.2. Note that a check in
normally removes the working file. To retrieve a read-only copy,
do a check out without a lock:
This is useful when you need to keep a copy on hand for compiling or searching.
As a shortcut to the previous
, you could type:
This checks in the file but immediately checks out a read-only copy.
To compare changes between a working file and its latest revision,
you can type:
Another useful command is
, which shows a summary of
log messages. System administrators can use the
to set up default behavior of RCS.