front end for the Source Code Control System (SCCS) subsystem
sccs [-r] [-d prefixpath ] [-p sccspath]
command [options] [file ... ]
command is a front end to various
commands in the Source
Code Control System (SCCS) subsystem, a tool to track changes in a file.
The database files, or SCCS files, are kept by default in a subdirectory
named ``SCCS'' in the current directory.
sccs prefixes the string "SCCS/s."
file argument before it passes the
file argument to its command argument.
This prefix may be customized using
options -p and -d, or the environment variable
The command argument can be one of the
pseudo-commands or SCCS commands listed separately in the
``Pseudo-commands'' and ``SCCS commands'' subsections.
Options and option arguments
specific to the command being used must appear after
the command argument and are passed to
Options to sccs itself
must appear before the command argument.
supports three options, -r, -d, and -p.
Run command as the real user,
not as the effective user that sccs has been
set to through
Not every user can run command through sccs
as this would allow anyone to change the file authorizations.
Those commands that are always run as the real user include
admin, check, clean,
diffs, info, rmdel, and tell.
Use prefixpath, instead of the current directory,
as the root directory of the pathname
for the SCCS files.
If the environment variable PROJECTDIR is set, this option overrides
the value set in that environment variable. See also -p below.
Use sccspath, instead of SCCS, as
the pathname of the directory in which the SCCS files are kept.
Before sccs passes the
modified filename to its command argument,
it will insert
sccspath before the final
component of the argument file.
For example, when the command:
sccs -p sccspath get b/file
is used in the directory /a, sccspath will be
inserted before file and the command passed to the system
is converted to:
Without the -p option, the command passed to the system is:
The difference between the -d and -p options is that
prefixpath is prefixed to the entire pathname and
sccspath is inserted before the final component of
the pathname. If the sccs command is used with the
-d option in the directory
sccs -d /x get b/file
the pathname of the current directory /a
is replaced by the prefix /x and the command passed to the system is:
The options -d and -p can also be used together as in:
sccs -d /x -p sccspath get b/file
The command passed to the system from this
sccs command is:
Several pseudo-commands are supported.
These pseudo-commands can be used as the command argument
Options for these pseudo-commands should be given in the
options argument to sccs, following command.
If there is any file being checked
out for editing,
check returns a non-zero exit status and prints a listing
of files being edited. This is equivalent to info below.
It is different from info only when nothing is being edited:
check prints nothing and returns a zero exit status.
This can be an useful install entry in a makefile in order to make sure that
all changes are saved in the SCCS file before a version is installed.
Remove all files from the current directory that can be
reconstructed from SCCS files.
Normally, files checked out for editing are not removed even if no changes
have been made yet. However, branch deltas checked out for editing
will be removed if option -b is used.
Use this option carefully
if branches are also kept in the current directory, because changes
made to these branches since the last get will be lost.
Create a new SCCS file in the SCCS directory for each named file.
Any valid option for admin
is valid for create.
The text from the
file file constitutes the first delta
of the SCCS file and the original file, file, will
be renamed by prefixing its basename with a comma (,).
Remove these renamed files after all SCCS files have been created
successfully. Note that no subsequent get is
performed on any SCCS files created.
For each named file, first perform a delta and then a get.
the get is not for editing and the
new version of the files will have their ID keywords expanded.
Options -m, -p, -r, -s and -y
given to delget will be passed to delta and
options -b, -c, -e, -i,
-k -l, -s and -x given to
delget will be passed to get.
This is the same as delget, except that the get is for
editing by default (get -e).
deledit passes the same options to delta as
delget does; except for -e, deledit
passes all other options that delget passes to get
another pseudo-command described below.
Compare the current version of the file being edited
with the versions stored in the SCCS file.
Options that can be given to diffs and passed to get
are -r, -c, -i, -x and -t.
Other options are passed to
These include -e, -f -h and -b.
Check out a file for editing. This is the same as get -e.
fix -r SID
Remove the named delta from the SCCS file and keep a copy
in the current directory.
The file kept has all the changes that were in the removed delta.
The -r option is required for fix.
No audit trail is left by fix. Use it carefully.
Print a listing of all files being edited.
Use the option -b
to ignore branches in the listing.
In other words, if the option -b is used,
at most two components of SIDs are displayed in the listing.
Use the option -u user to display a listing of all files
being edited by the named user. The option -U
is the same as -u current_user.
Print verbose information about the named files. print is the
same as prs passed to sccs.
Print a listing of all files being edited, one line per filename.
Options -b, -u and -U may be used as in
info and check.
For example, to examine the changes made to all files being edited:
sccs diffs `sccs tell -U`
or to delta all files being edited:
sccs delta `sccs tell -U`
Discard any changes made to a file being edited
since the last edit command (or
get -e). No subsequent get is performed on the file.
The following SCCS commands can be passed
to the SCCS front end, sccs.
Options for these SCCS commands should be given in the
options argument to sccs, following command.
For descriptions of these options,
see the manual pages for each individual command.
Below is the usage summary of these SCCS commands.
Create new SCCS files or change parameters of existing SCCS
files. For creating new SCCS files, it is perhaps easier
to use sccs create.
Use sccs admin for other administrative tasks
on existing SCCS files.
Make a delta (change) to an SCCS file
retrieved for editing.
Retrieve a version of an SCCS file.
When the option -e is used, the ID keywords in the file are not
expanded. The retrieved file may be edited and the changes made to the
file saved later by delta.
The sccs pseudo-commands sccs delget or
combine the delta and get commands into one.
Print information about an SCCS file.
Remove a delta from an SCCS file.
The delta to be removed must not be the SID of the next delta
if the file is currently checked out for editing.
Print a summary of editing activity for named files. The information
includes the SID of the delta that currently exists in the SCCS file and
the SID of the next delta, the date and time when the command get -e
was executed, and the user who executed the command.
Discard changes made to a file that is checked out for editing.
Validate parameters, such as SID and the %M% and %Y%
keywords, stored in SCCS files.
Display identification information formed by
expanding the ID keyword %Z%.
Several environment variables may be used to change the default behavior
of sccs and provide a default value for prefixpath.
Additional environment variables may also
be used to change the default behavior of specific SCCS commands.
For descriptions of these additional environment variables,
see the manual pages for each individual command. Listed below
are environment variables used with sccs:
Set the default value for
all internationalization variables (of the form LC_*) that
are either null or have not been set a value.
The default value for LANG is taken from the
system configured default locale,
and this default value is used if LANG is
null or has not been set.
for how to set a system default locale.
If any one of the internationalization variables has been set incorrectly,
sccs treats all these internationalization variables
as if they have not been set.
If LC_ALL has been set to a non-empty string,
it is the locale used for
all other internationalization variables even when
they are set.
Use this locale in mapping
sequences of bytes (in both arguments and input text files) to characters.
The mapping follows the
character classifications defined in the named locale.
Use this locale for standard error messages.
The conventions are defined by the message catalogs
for this locale. Both the format and contents of diagnostic messages
may be affected by LC_MESSAGES.
A pathname template for message catalogs.
The default value for prefixpath. If
PROJECTDIR is an absolute pathname (starts with a slash),
it is used as prefixpath.
If it is a relative pathname, sccs will first
treat PROJECTDIR as a username and search in that user's
home directory for a subdirectory named src or source.
If such a subdirectory exists, the name of that directory will be used
by sccs as prefixpath. Otherwise, sccs
will use the value of PROJECTDIR for prefixpath.
For example, if a user johns has a src directory
under his home directory /u/johns:
and PROJECTDIR has been set to johns, the command:
sccs get prog.c
will be converted to:
regardless of the directory in which the sccs command is issued.
The sccs command returns an
exit value of 0 if no error occurred,
otherwise it returns a value greater than zero.
See the description for the specified command.
This example shows how to put a file named
prog.c under SCCS control for the first time.
First create an SCCS subdirectory
if it does not exist, and then enter the file
into the SCCS database, as in:
sccs create prog.c
After verifying that prog.c has been entered successfully,
remove the back up copy of the file whose name now starts with a comma:
This example shows how to get a copy of prog.c
for editing, edit the file using the
editor, and then check it back into
the SCCS database, getting a read-only version of the file for later use:
sccs edit prog.c
sccs delget prog.c
This example shows how to update a large number of SCCS database files which
all have the same change in this delta, and get a read-only copy for each of
sccs delget *.c < reason
The text file, reason, describes the change that has been made,
and provides delta with the comment text directly.
The user is not asked interactively for the delta comments
comments? prompt in this example.
sccs is conformant with:
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003