RCS(1)
โจ RCS(1) โ like, the rcs command, bestie โจ
okay so this is the manual page for rcs, straight out of the General Commands Manual section โ and no, we're not gatekeeping, you're gonna get every single flag. ๐
๐ธ NAME ๐ธ
rcs โ change RCS file attributes
๐ SYNOPSIS ๐
rcs options file ...
๐ฆ DESCRIPTION ๐ฆ
So what does rcs actually do? It creates new RCS files or changes attributes of existing ones. That's the whole vibe. ๐ซถ
An RCS file is literally a little container holding: multiple revisions of text, an access list, a change log, descriptive text, and some control attributes. Like a really organized girlie's closet but for versions. ๐
Now, the permission check โ and this part matters, so listen up: for rcs to work, the caller's login name must be on the access list. The exceptions (i.e. when you're fine without being on the list) are:
- the access list is empty, or
- the caller is the owner of the file or the superuser, or
- the
-ioption is present.
Filenames matching an RCS suffix denote RCS files; everything else denotes working files. Names are paired as explained in ci(1). Revision numbers use the syntax described in ci(1). (Yes, go read ci(1), it's the sister page, they're a duo. ๐)
๐ OPTIONS ๐
Every single one, no cuts, no skips. Let's go. ๐ฅ
-iโ Create and initialize a brand-new RCS file, but don't deposit any revision. If the RCS file name has no directory component, it tries to place it first into the subdirectory./RCS, and then into the current directory. If the RCS file already exists, it prints an error message. ๐-aloginsโ Append the login names appearing in the comma-separated list logins to the access list of the RCS file. Let them in, bestie. ๐ซถ-Aoldfileโ Append the access list of oldfile to the access list of the RCS file. Copy-paste the guest list, iconic.-e[logins]โ 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. Blocked. ๐-b[rev]โ Set the default branch to rev. If rev is omitted, the default branch is reset to the (dynamically) highest branch on the trunk. Main character branch energy.-cstringโ Set the comment leader to string. An initialci, or anrcs -iwithout-c, guesses the comment leader from the suffix of the working file name.
โ ๏ธ Heads up: this option is obsolescent, since RCS normally uses the preceding$Log$line's prefix when inserting log lines during checkout (seeco(1)). 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. Past-and-present compatibility, we love a flexible queen. โจ
-ksubstโ Set the default keyword substitution to subst. The effect of keyword substitution is described inco(1). Giving an explicit-koption toco,rcsdiff, andrcsmergeoverrides this default.
๐ Bewarercs -kv, because-kvis incompatible withco -l. Usercs -kkvto restore the normal default keyword substitution. Not me warning you twice, but like, I'm warning you twice.
-l[rev]โ 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 withrcs -u(see below). ๐-u[rev]โ 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. Normally, only the locker of a revision can unlock it. Somebody else unlocking a revision 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 solicited from the breaker. The commentary is terminated by end-of-file or by a line containing.by itself. ๐ฉ-Lโ Set locking to strict. Strict locking means that the owner of an RCS file is not exempt from locking for checkin. This option should be used for files that are shared. โจ-Uโ Set locking to non-strict. Non-strict locking means that the owner of a file need not 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. ๐ซถ-mrev:[msg]โ Replace revision rev's log message with msg. If msg is omitted, it defaults to"*** empty log message ***". (The most passive-aggressive default string in all of Unix, ngl. ๐)-Mโ Do not send mail when breaking somebody else's lock. This option is not meant for casual use; it is meant for programs that warn users by other means, and invokercs -uonly as a low-level lock-breaking operation. ๐-nname[:[rev]]โ 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 already associated with another number. If rev is symbolic, it is expanded before association. 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 -nname: RCS/* associates name with the current latest revision of all the named RCS files; this contrasts with rcs -nname:$ RCS/* which associates name with the revision numbers extracted from keyword strings in the corresponding working files. It's giving subtle but crucial difference. ๐
-Nname[:[rev]]โ Act like-n, except override any previous assignment of name. No loyalty to the old name, we move on. ๐ฆ-orangeโ deletes ("outdates") the revisions given by range. A range consisting of a single revision 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,:revmeans from the beginning of the branch containing rev up to and including rev, andrev:means from revision rev to the end of the branch containing rev.
๐จ None of the outdated revisions can have branches or locks. That's a hard rule, no exceptions, periodt.
-qโ Run quietly; do not print diagnostics. ๐คซ (The introvert flag.)-Iโ Run interactively, even if the standard input is not a terminal. Forced extroversion. ๐ฃ๏ธ-sstate[:rev]โ Set the state attribute of the revision rev to state. If rev is a branch number, assume the latest revision on that branch. If rev is omitted, assume the latest revision on the default branch. Any identifier is acceptable for state. A useful set of states isExp(for experimental),Stab(for stable), andRel(for released). By default,ci(1)sets the state of a revision toExp. ๐ท๏ธ-t[file]โ 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 itself. Prompt for the text if interaction is possible; see-I. With-i, descriptive text is obtained even if-tis not given. โ๏ธ-t-stringโ Write descriptive text from the string into the RCS file, deleting the existing text. Inline description, no file needed, we love efficiency. ๐-Tโ Preserve the modification time on the RCS file unless a revision is removed. This option can suppress extensive recompilation caused by amake(1)dependency of some copy of the working file on the RCS file.
โ ๏ธ Use this option with care; it can suppress recompilation 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. Careful, bestie. ๐
-Vโ Print RCS's version number. Identity check. ๐-Vnโ Emulate RCS version n. Seeco(1)for details. Time travel, but make it version control. โณ-xsuffixesโ Use suffixes to characterize RCS files. Seeci(1)for details.-zzoneโ Use zone as the default time zone. โฐ This option has no effect; it is present for compatibility with other RCS commands.
๐ Important vibe check: at least one explicit option must be given, to ensure compatibility with future planned extensions to the rcs command. You cannot just run it all willy-nilly, it needs direction. โจ
๐ COMPATIBILITY ๐
Some history, because the lore matters:
- The
-brevoption generates an RCS file that cannot be parsed by RCS version 3 or earlier. ๐ - The
-ksubstoptions (except-kkv) generate an RCS file that cannot be parsed by RCS version 4 or earlier. - Use
rcs -Vnto 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
-xoption, and requires a,vsuffix on an RCS file name.
๐ FILES ๐
rcs accesses files much as ci(1) does, except that:
- it uses the effective user for all accesses,
- 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.
Read-only, no notes, boundaries are everything. ๐ซถ
๐ง ENVIRONMENT ๐ง
RCSINITโ Options prepended to the argument list, separated by spaces. A backslash escapes spaces within an option. TheRCSINIToptions are prepended to the argument lists of most RCS commands. UsefulRCSINIToptions 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 tounlimited. Otherwise (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 settingRCS_MEM_LIMITto a numeric value lim (measured in kilobytes). An empty value is silently ignored. As a side effect, specifyingRCS_MEM_LIMITinhibits fall-back to slower routines. โกTMPDIRโ Name of the temporary directory. If not set, the environment variablesTMPandTEMPare 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. No partial credit, girlie. โญ
๐ IDENTIFICATION ๐
Author: Walter F. Tichy. Manual Page Revision: 5.10.1; Release Date: 2024-10-01. Copyright ยฉ 2010-2022 Thien-Thi Nguyen. Copyright ยฉ 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert. Copyright ยฉ 1982, 1988, 1989 Walter F. Tichy.
(The legends themselves. Respect. ๐โโ๏ธ)
๐ฅ SEE ALSO ๐ฅ
co(1), ci(1), ident(1), rcsclean(1), rcsdiff(1), rcsmerge(1), rlog(1), rcsfile(5).
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) 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. Go browse, bestie. ๐๐
๐ BUGS ๐
okay bestie, listen, there are a couple of things that can go sideways and you need to know about them before they happen to you, not after ๐ญ
- A catastrophe (like, say, a system crash ๐ฅ) can cause RCS to leave behind a semaphore file, and that leftover little gremlin makes later invocations of RCS claim that the RCS file is in use ๐. The fix? Just remove the semaphore file, bestie. That's it. Its name typically begins with
,or ends with_, so go hunt it down ๐ต๏ธโโ๏ธ - The separator for revision ranges in the
-ooption used to be-instead of:, and ngl that leads to confusion when symbolic names contain-๐. For backwards compatibilityrcs -ostill supports the old-separator, but it warns about this obsolete use. So likeโฆ it works, but it's giving "living in the past" ๐ - Symbolic names need not refer to existing revisions or branches โจ. For example, the
-ooption does not remove symbolic names for the outdated revisions โ you must use-nto remove the names. No cap,-ois not gonna clean those up for you, that's-n's job ๐
fr fr: if RCS is acting like a file is in use and you're sure nothing's running, go delete that semaphore file and you're slay again ๐
okay that's the whole page bestie, you made it to the end, I'm so proud of you ๐ซถ๐ this gorgeous little manual is GNU RCS 5.10.1, dated 2024-10-01, and yes she ate, periodt โจ๐๐ท
๐ฆ where this page comes from
- opensuse-leap 16.0: rcs 5.10.1-160000.2.2 ยท GPL-3.0-or-later
- opensuse-leap 16.0: rcs 5.10.1-160000.2.2 ยท GPL-3.0-or-later
- opensuse-leap 16.0: rcs 5.10.1-160000.2.2 ยท GPL-3.0-or-later
- opensuse-leap 16.0: rcs 5.10.1-160000.2.2 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms