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

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: 18.5 Alphabetical Summary of CommandsChapter 18
The RCS Utility
Next: Reference: co


ci [options] files

Check in revisions. ci stores the contents of the specified working files into their corresponding RCS files. Normally, ci deletes the working file after storing it. If no RCS file exists, then the working file is an initial revision. In this case, the RCS file is created and you are prompted to enter a description of the file. If an RCS file exists, ci increments the revision number and prompts you to enter a message that logs the changes made. In RCS Version 5.6, if a working file is checked in without changes, the file reverts to the previous revision. In older RCS versions, you may end up having to check in a new revision that contains no changes.

The mutually exclusive options -u, -l, and -r, are the most common. Use -u to keep a read-only copy of the working file (for example, so that the file can be compiled or searched). Use -l to update a revision and then immediately check it out again with a lock. This allows you to save intermediate changes but continue editing (for example, during a long editing session). Use -r to check in a file with a different release number. ci accepts the standard options -q, -V, and -x.



Check the file in with a timestamp of date or, if no date is specified, with the time of last modification.


Force a check in even if there are no differences.


Interactive mode; prompt user even when standard input is not a terminal (e.g., when ci is part of a command pipeline). -I is new in RCS Version 5.


Assign a revision number, creation date, state, and author from keyword values that were placed in the working file, instead of computing the revision information from the local environment. -k is useful for software distribution: the preset keywords serve as a timestamp shared by all distribution sites.


Do a co -l after checking in. This leaves a locked copy of the next revision.


Use the msg string as the log message for all files checked in. When checking in multiple files, ci normally prompts whether to reuse the log message of the previous file. -m bypasses this prompting.


Set the working file's modification time to that of the retrieved version. Use of -M can confuse make and should be used with care. (New in RCS Version 5.6.)


Associate a text name with the new revision number.


Same as -n, but override a previous name.


Check the file in as revision R.


Set the state of the checked-in revision.


Replace RCS file description with contents of file. As of Version 5, this works only for initial check in.


Replace RCS file description with string. As of Version 5, this works only for initial check in.


Do a co -u after checking in. This leaves a read-only copy.


Set the author field to user in the checked-in revision.


Check in chapter files using the same log message:

ci -m'First round edits' chap*

Check in edits to prog.c, leaving a read-only copy:

ci -u prog.c

Start revision level 2; refer to revision 2.1 as "Prototype":

ci -r2 -nPrototype prog.c

Previous: 18.5 Alphabetical Summary of CommandsUNIX in a Nutshell: System V EditionNext: Reference: co
18.5 Alphabetical Summary of CommandsBook IndexReference: co

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