📄 0066-0067.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>
</HEAD>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311046 //-->
<!-- TITLE=Linux Complete Command Reference//-->
<!-- AUTHOR=Red Hat//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=01 //-->
<!-- PAGES=0001-0736 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0065-0065.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0068-0068.html">Next</A></CENTER></P>
<A NAME="PAGENUM-66"><P>Page 66</P></A>
<P>For backwards compatibility with older versions of RCS, a bare
_t option is ignored.
<TABLE>
<TR><TD>
_T
</TD><TD>
Set the RCS file's modification time to the new revision's time if the former precedes the latter
and there is a new revision; preserve the RCS file's modification time otherwise. If you have locked
a revision, ci usually updates the RCS file's modification time to the current time, because the lock
is stored in the RCS file and removing the lock requires changing the RCS file. This can create
an RCS file newer than the working file in one of two ways: first,
ci _M can create a working file with a date before the current time; second, when reverting to the previous revision the RCS file
can change while the working file remains unchanged. These two cases can cause
excessive recompilation caused by a make(1) dependency of the working file on the RCS file. The
_T option inhibits this recompilation by lying about the RCS file's date. Use this option with care; it
can suppress recompilation even when a checkin of one working file should affect another working
file associated with the same RCS file. For example, suppose the RCS file's time is 01:00, the
(changed) working file's time is 02:00, some other copy of the working file has a time of 03:00, and
the current time is 04:00. Then ci _d _T sets the RCS file's time to 02:00 instead of the usual
04:00; this causes make(1) to think (incorrectly) that the other copy is newer than the RCS file.
</TD></TR><TR><TD>
_wlogin
</TD><TD>
Uses login for the author field of the deposited revision. Useful for lying about the author, and
for _k if no author is available.
</TD></TR><TR><TD>
_V
</TD><TD>
Print RCS's version number.
</TD></TR><TR><TD>
_Vn
</TD><TD>
Emulate RCS version n. See co(1) for details.
</TD></TR><TR><TD>
_xsuffixes
</TD><TD>
Specifies the suffixes for RCS files. A nonempty suffix matches any pathname ending in the
suffix. An empty suffix matches any pathname of the form
RCS/path or path1/RCS/path2. The _x option can specify a list of suffixes separated by
/. For example, _x,v/ specifies two suffixes: ,v and
the empty suffix. If two or more suffixes are specified, they are tried in order when looking for an
RCS file; the first one that works is used for that file. If no RCS file is found but an RCS file can
be created, the suffixes are tried in order to determine the new RCS file's name. The default
for suffixes is installation-dependent; normally it is
,v/ for hosts like UNIX that permit commas in filenames, and is empty (that is, just the empty suffix) for other hosts.
</TD></TR><TR><TD>
_zzone
</TD><TD>
Specifies the date output format in keyword substitution, and specifies the default time zone
for date in the _ddate option. The zone should be empty, a numeric UTC offset, or the special
string LT for local time. The default is an empty zone, which uses the traditional RCS format of
UTC without any time-zone indication and with slashes separating the parts of the date; otherwise,
times are output in ISO 8601 format with time zone indication. For example, if local time is January
11, 1990, 8 p.m. Pacific Standard Time, eight hours west of UTC, then the time is output as follows:
</TD></TR></TABLE>
<TABLE>
<TR><TD>
Option
</TD><TD>
Time Output
</TD></TR><TR><TD>
_z
</TD><TD>
1990/01/12 04:00:00 (default)
</TD></TR><TR><TD>
_zLT
</TD><TD>
1990-01-11 20:00:00_08
</TD></TR><TR><TD>
_z+05:30
</TD><TD>
1990-01-12 09:30:00+05:30
</TD></TR></TABLE>
<P>The _z option does not affect dates stored in RCS files, which are always UTC.
</P>
<P><B>
FILE NAMING
</B></P>
<P>Pairs of RCS files and working files can be specified in three ways. (See also "Examples," next.)
</P>
<OL>
<LI> Both the RCS file and the working file are given. The RCS pathname is of the
form path1/workfileX and the working pathname is of the form
path2/workfile where path1/ and path2/ are (possibly different or empty) paths,
workfile is a filename, and X is an RCS suffix. If
X is empty, path1/ must start with RCS/ or must contain
/RCS/.
<LI> Only the RCS file is given. Then the working file is created in the current directory and its name is derived from
the name of the RCS file by removing path1/ and the suffix
X.
</OL>
<A NAME="PAGENUM-67"><P>Page 67</P></A>
<OL START=3>
<LI> Only the working file is given. Then
ci considers each RCS suffix X in turn, looking for an RCS file of the form
path2/RCS/workfileX or (if the former is not found and
X is nonempty) path2/workfileX.
</OL>
<P>If the RCS file is specified without a path in one of the first two preceding scenarios,
ci looks for the RCS file first in the directory
./RCS and then in the current directory.
</P>
<P>ci reports an error if an attempt to open an RCS file fails for an unusual reason, even if the RCS file's pathname is just
one of several possibilities. For example, to suppress use of RCS commands in a
directory d, create a regular file named d/RCS so that casual attempts to use RCS commands in
d fail because d/RCS is not a directory.
</P>
<P><B>
EXAMPLES
</B></P>
<P>Suppose ,v is an RCS suffix and the current directory contains a subdirectory RCS with an RCS file
io.c,v. Then each of the following commands checks in a copy of
io.c into RCS/io.c,v as the latest revision, removing
io.c:
</P>
<!-- CODE SNIP //-->
<PRE>
ci io.c; ci RCS/io.c,v; ci io.c,v;
ci io.c RCS/io.c,v; ci io.c io.c,v;
ci RCS/io.c,v io.c; ci io.c,v io.c;
</PRE>
<!-- END CODE SNIP //-->
<P>Suppose instead that the empty suffix is an RCS suffix and the current directory contains a subdirectory RCS with an
RCS file io.c. Then each of the following commands checks in a new revision:
</P>
<!-- CODE SNIP //-->
<PRE>
ci io.c; ci RCS/io.c;
ci io.c RCS/io.c;
ci RCS/io.c io.c;
</PRE>
<!-- END CODE SNIP //-->
<P><B>
FILE MODES
</B></P>
<P>An RCS file created by ci inherits the read and execute permissions from the working file. If the RCS file exists already,
ci preserves its read and execute permissions. ci always turns off all write permissions of RCS files.
</P>
<P><B>
FILES
</B></P>
<P>Temporary files are created in the directory containing the working file, and also in the temporary directory. (See
TMPDIR under "Environment.") A semaphore file or files are created in the directory containing the RCS file. With a
nonempty suffix, the semaphore names begin with the first character of the suffix; therefore, do not specify an suffix whose
first character could be that of a working filename. With an empty suffix, the semaphore names end with an underscore (_),
so working filenames should not end in _. ci never changes an RCS or working file. Normally,
ci unlinks the file and creates a new one; but instead of breaking a chain of one or more symbolic links to an RCS file, it unlinks the destination file
instead. Therefore, ci breaks any hard or symbolic links to any working file it changes; and hard links to RCS files are ineffective,
but symbolic links to RCS files are preserved.
</P>
<P>The effective user must be able to search and write the directory containing the RCS file. Normally, the real user must
be able to read the RCS and working files and to search and write the directory containing the working file; however,
some older hosts cannot easily switch between real and effective users, so on these hosts the effective user is used for all
accesses. The effective user is the same as the real user unless your copies of
ci and co have setuid privileges. These privileges
yield extra security if the effective user owns all RCS files and directories, and if only the effective user can write RCS directories.
</P>
<P>Users can control access to RCS files by setting the permissions of the directory containing the files; only users with
write access to the directory can use RCS commands to change its RCS files. For example, in hosts that allow a user to belong
to several groups, one can make a group's RCS directories writable to that group only. This approach suffices for
informal projects, but it means that any group member can arbitrarily change the group's RCS files, and can even remove
them entirely. Hence, more formal projects sometimes distinguish between an RCS administrator, who can change the RCS
files at will, and other project members, who can check in new revisions but cannot otherwise change the RCS files.
</P>
<P><B>
SETUID USE
</B></P>
<P>To prevent anybody but their RCS administrator from deleting revisions, a set of users can employ
setuid privileges as follows:
</P>
<P><CENTER>
<a href="0065-0065.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0068-0068.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -