# rcs(1) - man - phpMan

[RCS(1)](https://www.chedong.com/phpMan.php/man/RCS/1/markdown)                                 General Commands Manual                                [RCS(1)](https://www.chedong.com/phpMan.php/man/RCS/1/markdown)



## NAME
       rcs - change RCS file attributes

## SYNOPSIS
       **rcs** _options_ _file_ ...

## DESCRIPTION
       **rcs**  creates new RCS files or changes attributes of existing ones.  An RCS file contains mul‐
       tiple revisions of text, an access list, a change log, descriptive text, and some control at‐
       tributes.  For **rcs** to work, the caller's login name must be on the access list, except if the
       access list is empty, the caller is the owner of the file or the superuser, or the **-i**  option
       is present.

       Filenames  matching  an  RCS suffix denote RCS files; all others denote working files.  Names
       are paired as explained in [**ci**(1)](https://www.chedong.com/phpMan.php/man/ci/1/markdown).  Revision numbers use the syntax described in [**ci**(1)](https://www.chedong.com/phpMan.php/man/ci/1/markdown).

## OPTIONS
### -i
              file  name  has  no  directory  component, try to place it first into the subdirectory
              **./RCS**, and then into the current directory.  If the RCS file already exists, print  an
              error message.

### -a
              Append the login names appearing in the comma-separated list _logins_ to the access list
              of the RCS file.

### -A
              Append the access list of _oldfile_ to the access list of the RCS file.

### -e
              Erase the login names appearing in the comma-separated list  _logins_  from  the  access
              list of the RCS file.  If _logins_ is omitted, erase the entire access list.

### -b
              Set  the default branch to _rev_.  If _rev_ is omitted, the default branch is reset to the
              (dynamically) highest branch on the trunk.

### -c
              Set the comment leader to _string_.  An initial **ci**, or an **rcs** **-i** without **-c**, guesses the
              comment leader from the suffix of the working file name.

              This  option is obsolescent, since RCS normally uses the preceding **$Log$** line's prefix
              when inserting log lines during checkout (see [**co**(1)](https://www.chedong.com/phpMan.php/man/co/1/markdown)).  However, older versions of  RCS
              use  the comment leader instead of the **$Log$** line's prefix, so if you plan to access a
              file with both old and new versions of RCS, make sure its comment leader  matches  its
              **$Log$** line prefix.

### -k
              Set  the default keyword substitution to _subst_.  The effect of keyword substitution is
              described in [**co**(1)](https://www.chedong.com/phpMan.php/man/co/1/markdown).  Giving an explicit **-k** option to **co**, **rcsdiff**, and  **rcsmerge**  over‐
              rides  this  default.   Beware  **rcs** **-kv**,  because **-kv** is incompatible with **co** **-l**.  Use
              **rcs** **-kkv** to restore the normal default keyword substitution.

### -l
              Lock the revision with number _rev_.  If a branch is given, lock the latest revision  on
              that  branch.   If  _rev_  is  omitted,  lock the latest revision on the default branch.
              Locking prevents overlapping changes.  If someone else already  holds  the  lock,  the
              lock is broken as with **rcs** **-u** (see below).

### -u
              Unlock the revision with number _rev_.  If a branch is given, unlock the latest revision
              on that branch.  If _rev_ is omitted, remove the latest lock held by the  caller.   Nor‐
              mally,  only  the locker of a revision can unlock it.  Somebody else unlocking a revi‐
              sion breaks the lock.  If RCS was configured **--with-mailer**, then this  causes  a  mail
              message  to  be  sent  to  the original locker.  The message contains a commentary so‐
              licited from the breaker.  The commentary is terminated by end-of-file or  by  a  line
              containing **.** by itself.

### -L
              empt from locking for checkin.  This option should be used for files that are shared.

### -U
              lock  a  revision  for  checkin.   This  option  should _not_ be used for files that are
              shared.  Whether default locking is strict is determined by your system administrator,
              but it is normally strict.

### -m
              Replace  revision  _rev_'s log message with _msg_.  If _msg_ is omitted, it defaults to "***
              empty log message ***".

### -M
              sual  use;  it is meant for programs that warn users by other means, and invoke **rcs** **-u**
              only as a low-level lock-breaking operation.

### -n
              Associate the symbolic name _name_ with the branch or revision _rev_.  Delete the symbolic
              name  if  both **:** and _rev_ are omitted; otherwise, print an error message if _name_ is al‐
              ready associated with another number.  If _rev_ is symbolic, it is expanded before asso‐
              ciation.   A  _rev_ consisting of a branch number followed by a **.** stands for the current
              latest revision in the branch.  A **:** with an empty _rev_ stands for  the  current  latest
              revision  on  the  default branch, normally the trunk.  For example, **rcs** **-n**_name_**:** **RCS/***
              associates _name_ with the current latest revision of all the named RCS files; this con‐
              trasts  with  **rcs** **-n**_name_**:$** **RCS/***  which  associates _name_ with the revision numbers ex‐
              tracted from keyword strings in the corresponding working files.

### -N
              Act like **-n**, except override any previous assignment of _name_.

### -o
              deletes (“outdates”) the revisions given by _range_.  A range consisting of a single re‐
              vision  number  means  that revision.  A range consisting of a branch number means the
              latest revision on that branch.  A range of the form _rev1_**:**_rev2_ means revisions _rev1_ to
              _rev2_ on the same branch, **:**_rev_ means from the beginning of the branch containing _rev_ up
              to and including _rev_, and _rev_**:** means from revision _rev_ to the end of the  branch  con‐
              taining _rev_.  None of the outdated revisions can have branches or locks.

### -q

### -I

### -s
              Set  the state attribute of the revision _rev_ to _state_.  If _rev_ is a branch number, as‐
              sume the latest revision on that branch.  If _rev_ is omitted, assume the  latest  revi‐
              sion  on the default branch.  Any identifier is acceptable for _state_.  A useful set of
              states is **Exp** (for experimental), **Stab** (for stable), and **Rel** (for released).   By  de‐
              fault, [**ci**(1)](https://www.chedong.com/phpMan.php/man/ci/1/markdown) sets the state of a revision to **Exp**.

### -t
              Write descriptive text from the contents of the named _file_ into the RCS file, deleting
              the existing text.  The _file_ name cannot begin with **-**.  If _file_ is omitted, obtain the
              text  from  standard input, terminated by end-of-file or by a line containing **.** by it‐
              self.  Prompt for the text if interaction is possible; see **-I**.  With  **-i**,  descriptive
              text is obtained even if **-t** is not given.

### -t-
              Write descriptive text from the _string_ into the RCS file, deleting the existing text.

### -T
              tion can suppress extensive recompilation caused by a [**make**(1)](https://www.chedong.com/phpMan.php/man/make/1/markdown) dependency of some  copy
              of  the  working file on the RCS file.  Use this option with care; it can suppress re‐
              compilation even when it is needed, i.e. when a change to the RCS file  would  mean  a
              change to keyword strings in the working file.

### -V

### -V

### -x
              Use _suffixes_ to characterize RCS files.  See [**ci**(1)](https://www.chedong.com/phpMan.php/man/ci/1/markdown) for details.

### -z
              patibility with other RCS commands.

       At least one explicit option must be given, to ensure compatibility with future  planned  ex‐
       tensions to the **rcs** command.

## COMPATIBILITY
       The **-b**_rev_ option generates an RCS file that cannot be parsed by RCS version 3 or earlier.

       The **-k**_subst_ options (except **-kkv**) generate an RCS file that cannot be parsed by RCS version 4
       or earlier.

       Use **rcs** **-V**_n_ to make an RCS file acceptable to RCS version _n_ by  discarding  information  that
       would confuse version _n_.

       RCS  version  5.5  and earlier does not support the **-x** option, and requires a **,v** suffix on an
       RCS file name.

## FILES
       **rcs** accesses files much as [**ci**(1)](https://www.chedong.com/phpMan.php/man/ci/1/markdown) does, except that it uses the effective  user  for  all  ac‐
       cesses,  it  does  not write the working file or its directory, and it does not even read the
       working file unless a revision number of **$** is specified.

## ENVIRONMENT
       **RCSINIT**
              Options prepended to the argument list, separated by spaces.  A backslash escapes spa‐
              ces within an option.  The **RCSINIT** options are prepended to the argument lists of most
              RCS commands.  Useful **RCSINIT** options include **-q**, **-V**, **-x**, and **-z**.

       **RCS**___**MEM**___**LIMIT**
              Normally, for speed, commands either memory map or copy into memory the  RCS  file  if
              its size is less than the _memory-limit_, currently defaulting to ``unlimited''.  Other‐
              wise (or if the initially-tried speedy ways fail), the commands  fall  back  to  using
              standard  i/o routines.  You can adjust the memory limit by setting **RCS**___**MEM**___**LIMIT** to a
              numeric value _lim_ (measured in kilobytes).  An empty value is silently ignored.  As  a
              side effect, specifying **RCS**___**MEM**___**LIMIT** inhibits fall-back to slower routines.

       **TMPDIR** Name  of  the temporary directory.  If not set, the environment variables **TMP** and **TEMP**
              are inspected instead and the first value found is taken; if none of them are  set,  a
              host-dependent default is used, typically **/tmp**.

## DIAGNOSTICS
       The  RCS file name and the revisions outdated are written to the diagnostic output.  The exit
       status is zero if and only if all operations were successful.

## IDENTIFICATION
       Author: Walter F. Tichy.
       Manual Page Revision: 5.10.1; Release Date: 2022-02-19.
       Copyright © 2010-2022 Thien-Thi Nguyen.
       Copyright © 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
       Copyright © 1982, 1988, 1989 Walter F. Tichy.

## SEE ALSO
       [**co**(1)](https://www.chedong.com/phpMan.php/man/co/1/markdown), [**ci**(1)](https://www.chedong.com/phpMan.php/man/ci/1/markdown), [**ident**(1)](https://www.chedong.com/phpMan.php/man/ident/1/markdown), [**rcsclean**(1)](https://www.chedong.com/phpMan.php/man/rcsclean/1/markdown), [**rcsdiff**(1)](https://www.chedong.com/phpMan.php/man/rcsdiff/1/markdown), [**rcsmerge**(1)](https://www.chedong.com/phpMan.php/man/rcsmerge/1/markdown), [**rlog**(1)](https://www.chedong.com/phpMan.php/man/rlog/1/markdown), [**rcsfile**(5)](https://www.chedong.com/phpMan.php/man/rcsfile/5/markdown).

       Walter F. Tichy, RCS--A System for Version Control, _Software--Practice_  _&_  _Experience_  **15**,  7
       (July 1985), 637-654.

       The  full  documentation  for  RCS is maintained as a Texinfo manual.  If the [**info**(1)](https://www.chedong.com/phpMan.php/man/info/1/markdown) and RCS
       programs are properly installed at your site, the command

              **info** **rcs**

       should give you access to the complete manual.  Additionally, the RCS homepage:

              **<http://www.gnu.org/software/rcs/>**

       has news and links to the latest release, development site, etc.

## BUGS
       A catastrophe (e.g. a system crash) can cause RCS to  leave  behind  a  semaphore  file  that
       causes  later  invocations  of RCS to claim that the RCS file is in use.  To fix this, remove
       the semaphore file.  A semaphore file's name typically begins with **,** or ends with ___.

       The separator for revision ranges in the **-o** option used to be **-** instead of **:**, but this  leads
       to  confusion  when  symbolic names contain **-**.  For backwards compatibility **rcs** **-o** still sup‐
       ports the old **-** separator, but it warns about this obsolete use.

       Symbolic names need not refer to existing revisions or branches.  For example, the **-o**  option
       does  not  remove  symbolic  names  for the outdated revisions; you must use **-n** to remove the
       names.



GNU RCS 5.10.1                               2022-02-19                                       [RCS(1)](https://www.chedong.com/phpMan.php/man/RCS/1/markdown)
