Полезная информация

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: mergeChapter 18
The RCS Utility
Next: Reference: rcsclean


rcs [options] files

An administrative command for setting up or changing the default attributes of RCS files. Among other things, rcs lets you set strict locking (-L), delete revisions (-o), and override locks set by co (-l and -u). RCS files have an access list (created via -a); anyone whose username is on the list can run rcs. The access list is often empty, meaning that rcs is available to everyone. In addition, you can always invoke rcs if you own the file, if you're a privileged user, or if you run rcs with -i. rcs accepts the standard options -q, -V, and -x.



Append the comma-separated list of users to the access list.


Append otherfile's access list to the access list of files.


Set the default branch to R or, if R is omitted, to the highest branch on the trunk.


The comment character for $Log keywords is set to string s. By default, co expands embedded $Log keywords into comments preceded by #. You could, for example, set s to .\" for troff files or set s to * for C programs. (You would need to manually insert an enclosing /* and */ before and after $Log.)


Erase everyone (or only the specified users) from the access list.


Create (initialize) an RCS file but don't deposit a revision.


Interactive mode; prompt user even when standard input is not a terminal. (New in RCS Version 5.)


Use c as the default style for keyword substitution. (See co for values of c.) -kkv restores the default substitution style; all other styles create incompatibilities with RCS Version 4 or earlier.


Lock revision R or the latest revision. -l "retroactively locks" a file and is useful if you checked out a file incorrectly by typing co instead of co -l.


Turn on strict locking (the default). This means that everyone, including the owner of the RCS file, must use co -l to edit files. Strict locking is recommended when files are to be shared. (See -U.)


Use the msg string to replace the log message of revision R. (New in RCS Version 5.6.)


Add or delete an association between a revision and a name. flags can be:


Associate name with revision R.


Associate name with latest revision.


Remove association of name.


Same as -n but overwrite existing names.


Delete (outdate) revisions listed in R_list. R_list can be specified as: R1, R1-R2, R1-, or -R2. When a branch is given, -o deletes only the latest revision on it. RCS Version 5.6 has changed the range separator character to :, although - is still valid.


Set the state of revision R (or the latest revision) to the word state.


Replace RCS file description with contents of file or, if no file is given, with standard output.


Replace RCS file description with string.


The complement of -l: unlock a revision that was previously checked out via co -l. If someone else did the check out, you are prompted to state the reason for breaking the lock. This message is mailed to the original locker.


Turn on non-strict locking. Everyone except the file owner must use co -l to edit files. (See -L.)


Associate the label To_customer with the latest revision of all RCS files:

rcs -nTo_customer: RCS/*

Add three users to the access list of file beatle_deals:

rcs -ageorge,paul,ringo beatle_deals

Delete revisions 1.2 through 1.5:

rcs -o1.2-1.5 doc

Replace an RCS file description with the contents of a variable:

echo "$description" | rcs -t file

Previous: Reference: mergeUNIX in a Nutshell: System V EditionNext: Reference: rcsclean
Reference: mergeBook IndexReference: rcsclean

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System