LinuxCommandLibrary

rcs

TLDR

Initialize RCS for a file (check in initial version)

$ ci [filename]
copy
Check out a file for editing (locked)
$ co -l [filename]
copy
Check out a read-only copy
$ co [filename]
copy
Check in changes with a log message
$ ci -m "[message]" [filename]
copy
View revision history
$ rlog [filename]
copy
Show differences between working file and latest revision
$ rcsdiff [filename]
copy
Check out a specific revision
$ co -r[1.2] [filename]
copy

SYNOPSIS

rcs [options] file...
ci [options] file...
co [options] file...

DESCRIPTION

RCS (Revision Control System) manages multiple revisions of files, providing version control for individual files. It automates storing, retrieving, logging, and merging revisions, making it useful for source code, documentation, and configuration files.
The workflow centers on ci (check-in) and co (check-out). Check-in stores a new revision and removes the working file by default. Check-out retrieves a revision; use -l to lock the file for exclusive editing.
RCS stores revisions efficiently using reverse deltas—the latest revision is stored complete, while older revisions are stored as differences. This makes retrieving the current version fast.
Revisions are numbered hierarchically (1.1, 1.2, 1.3, etc.). The first number is the release, the second is the level. Branches create additional number fields (1.2.1.1).

PARAMETERS

ci (check-in)

Store a new revision in the RCS file
co (check-out)
Retrieve a revision from the RCS file
rcs
Change RCS file attributes
rcsdiff
Compare RCS revisions
rcsmerge
Merge RCS revisions
rlog
Print revision log messages
-l
Lock the revision for exclusive editing (with co)
-u
Unlock after check-in (with ci)
-rrev
Specify revision number
-mmsg
Specify log message
-q
Quiet mode, suppress diagnostics

CAVEATS

RCS operates on individual files, not directories or projects. For multi-file version control, modern tools like Git are more appropriate.
The default check-in behavior removes the working file. Use ci -u to keep an unlocked copy or ci -l to keep a locked copy for continued editing.
RCS files (ending in ,v) are stored in the same directory or in an RCS/ subdirectory. Ensure proper permissions for collaborative use.

HISTORY

RCS was developed by Walter F. Tichy at Purdue University, first released in 1982. It was one of the earliest version control systems and influenced later tools like CVS (which added network support) and eventually Git. RCS is part of the GNU project and continues to be available on most Unix-like systems.

SEE ALSO

cvs(1), git(1), svn(1), diff(1)

Copied to clipboard