Man page of admin
Section: User Commands (1)
Return to Main Contents
admin - Creates and initializes or changes (administers) Source Code Control System (SCCS) files
command creates and initializes new Source
Code Control System (SCCS) files or changes specified parameters in existing
Creating and Initializing SCCS Files
admin [-a user] [-i[file]] |[-n] [-f header_flag[value]] [-m MRlist] [-r number[.number]] [-t[file]]
Changing Existing SCCS Files
admin [-a user] [-e user] [-d header_flag] [-f header_flag[value]] [-h] [-t[file]] [-z] sccs_file|-
Interfaces documented on this reference page conform to industry standards
admin: XPG4, XPG4-UNIX
Refer to the
reference page for more information
about industry standards and associated tags.
Adds the specified user to the list of users who can make
sets of changes (deltas) to the SCCS file. The
argument can be either a user name, a group name, or a group ID. Specifying
a group name or number is the same as specifying the names of all users in
that group. You can specify more than one
option on a
command line. If an SCCS file contains an
empty user list, anyone can add deltas.
If you precede
(exclamation point), the users specified are denied permission to make deltas.
[Compaq] If a file has a user list, the creator of the file must be
included in the list in order for the creator to make deltas to the file.
Removes the specified header flag from the SCCS file. You
can specify this option only with existing SCCS files. You can also specify
more than one
option in a single
Removes the specified user from the list of users allowed
to make deltas to the SCCS file. Specifying a group ID is equivalent to specifying
all user names common to that group. You can specify several
options on a single
command line. You can specify
this option only with existing SCCS files. See also the
Places the specified header flag and value in the SCCS file.
You can specify more than one header flag in a single
Checks the structure of the SCCS file and compares a newly
computed checksum with the checksum that is stored in the first line of the
SCCS file. When the checksum value is not correct, the file was improperly
modified or damaged. This option helps you detect damage caused by the improper
use of non-SCCS commands to modify SCCS files, as well as accidental damage.
option prevents writing to the file, so it cancels
the effect of any other options supplied. If an error message is returned
indicating the file is damaged, use the
option to recompute
the checksum. Then test to see if the file has been corrected by using the
Gets the text for a new SCCS file from
This text is the first delta of the file. If you specify the
option but you omit the
reads the text from standard input until it reaches End-of-File(Ctrl-D).
If you do not specify the
option, but you do specify the
creates an empty SCCS file. The
command can create only one file containing text at a time.
If you are creating two or more SCCS files with one call to
admin, you must use the
option, and the SCCS files
created are empty.
Specifies a list of Modification Request (MR) numbers to be
inserted into the SCCS file as the reason for creating the initial delta.
flag must be set. The MR numbers are
validated if the
flag has a value (the name
of an MR number validation program). The
reports an error if the
flag is not set or
if the MR validation fails.
Creates a new, empty SCCS file.
[Compaq] Do not specify this option when you use the
option. See the description of the
option for details.
Inserts the initial delta into
number.number, the release and version, respectively. You can specify
only if you also specify the
option. If you do not specify this option, the initial delta becomes release
1, version 1. Use this option only when creating an SCCS file. If the version
number is omitted, the version is set to 1 by default.
Takes descriptive text for the SCCS file from
file. If you use
when creating a new SCCS
file, you must supply a file name.
In the case of an existing SCCS file without a file name,
causes removal of the descriptive text (if any) currently in the
In the case of an existing SCCS file with a file name,
causes text in the named file to replace the descriptive text (if
any) currently in the SCCS file.
Inserts comment text into the initial delta in a manner identical
to that of the
command. Use the
option only when you create an SCCS file. If you do not specify a comment,
inserts a line of the following form:
date and time created YY/MM/DD HH:MM:SS by login
99, the year is interpreted as being in the twentieth
century, i.e. 19YY. Otherwise, the year is interpreted as being in the twenty-first
century, i.e. 20YY.
Recomputes the SCCS file checksum and stores it in the first
line of the SCCS file. (See the
with this option on a damaged file can
prevent future detection of the damage. Use this option only if the SCCS
file is changed using non-SCCS commands because of a previous serious error.
The name of an SCCS file to be created or modified.
If the named file exists,
modifies its parameters
as specified by the flags. If it does not exist and you supply the
option or the
creates the new file and provides default values for unspecified options.
If you specify a directory name for
performs the requested actions on all SCCS files in that directory
(all files with the
If you specify a
(hyphen) as a file name,
reads standard input and interprets each line as the name
of an SCCS file. An End-of-File character ends input.
The parameters that can be modified by
command builds the files that you can edit.
The parameters also provide information about who can access the file, who
can make changes, and when changes were made.
command is most often used to
create new SCCS files without setting parameters.
[Compaq] If you are not familiar with the delta numbering system, see
reference pages, and the
Programming Support Tools
Creating an SCCS File
All SCCS file names must have the form
s.file. New SCCS files are created with read-only permission.
You must have write permission in the directory to create a file. (See the
reference page for an explanation of file permissions). The
command writes to a temporary x-file, which it calls
x.file. The x-file has the same permissions
as the original SCCS file if it already exists, and it is read-only if
creates a new file. After successful completion of
admin, the x-file is moved to the name of the SCCS file. This action
ensures that changes are made to the SCCS file only if
does not detect any errors while it is running.
You should create directories containing SCCS files with permission
code 755 (read, write, and execute permissions for owner, read and execute
permissions for group members and others). You should create SCCS files themselves
as read-only files (444). With these permissions, only the owner can use
non-SCCS commands to modify SCCS files. If a group can access and modify
the SCCS files, make sure the directories include group write permission.
command also uses a temporary lock file
z.file) to prevent
simultaneous updates to the SCCS file by different users. See the
reference page for additional information on the
table contains the header flags that can be set with the
option and unset with the
option. The header flags control
the format of the g-file created with the
reference page for details on the g-file.)
Lets you use the
option of a
command to create branch deltas.
the highest release
number that a
command can use.
The value of
must be less than or equal
to 9999. Its default value is 9999.
(SCCS ID) the default
delta supplied to a
the lowest release
number that a
command can retrieve.
argument must be greater than 0 and
less than 9999. Its default value is 1.
Treats the message ``There are no SCCS identification
keywords in the file. (cm7)'' (issued by the
command) as an error instead of a warning.
You may use
to specify that a particular
keyword, or set of keywords, separated by blanks and tab characters, must
be found in the file.
commands for editing
the same SID of an SCCS file. This flag allows multiple concurrent updates
to the same version of the SCCS file. This flag is sometimes called the ``joint
Locks the releases specified by
against editing, so that a
against one of these releases fails. If you specify
a, this is equivalent to specifying all releases in
[Compaq] You can lock all releases against editing by specifying
and unlock specific releases with the
for all occurrences
of the %M% keyword in an SCCS text file retrieved by a
command. The default
is the name of the
SCCS file without the
to create a null delta in
any releases that are skipped when a delta is made in a new release. For
example, if you make delta 5.1 after delta 2.7, releases 3 and 4 will be null.
The resulting null deltas can serve as points from which to build branch
deltas. Without this flag, skipped releases do not appear in the SCCS file.
for all occurrences
of the %Q% keyword in an SCCS text file retrieved by a
for all occurrences
of the %Y% keyword in a g-file retrieved by
prompt for Modification Request
(MR) numbers as the reason for creating a delta. The
argument specifies the name of an MR number validity checking
program. (See the
reference page.) If
is set in the SCCS
option must also be
used, even if its value is null.
The following exit values are returned:
An error occurred.
To create an empty SCCS file named
admin -n s.test.c
To convert an existing text file into an SCCS file, enter:
admin -itest.c s.test.c
command responds with the message:
There are no SCCS identification keywords in the file. (cm7)
This message does not indicate an error.
To rename the original text file, enter:
mv oldname.c newname.c
Identification keywords are variables that can be placed in
an SCCS file. The values of these variables provide information, such as
date, time, SID, or file name. See the
reference page for an explanation
of identification keywords.
Whether creating new files or converting an existing file, you can name
the SCCS file anything you like, as long as it begins with the
prefix. In this example, the original file and the SCCS file
have the same name, but that is not required.
When you do not specify a release number, as in both of the preceding
gives the SCCS file an SID of 1.1. SCCS
does not use the number 0 to identify deltas. Therefore, a file cannot have
an SID of 1.0 or 126.96.36.199. All new releases start with level 1. To start the
file with a release number of 3, use the
option with the
command, and enter:
admin -itest.c -r3 s.test.c
To restrict permission to change SCCS files to a specific
set of user IDs, list the user ID or group ID numbers in the user list of
the SCCS file with the
option. These IDs then appear in
the SCCS file header. Without the
option to restrict access,
all user IDs can change the SCCS files. To restrict permissions to the user
admin -ajulie s.test.c
Although SCCS provides some error protection, you might need
to recover a file that was accidentally damaged. This damage can result from
a system malfunction, operator error, or changing an SCCS file without using
SCCS commands use the checksum to determine whether a file was changed
since it was last used. The only SCCS command that processes a damaged file
command when used with the
to compare the checksum stored in the SCCS file header against
the computed checksum. The
to recompute the checksum and store it in the file header.
Check the SCCS files for possible damage on a regular basis. For example,
admin -h s.file1 s.file2 ...
admin -h directory1 directory2 ...
finds a file where the computed checksum
is not equal to the checksum listed in the SCCS file header, it displays the
message of the form:
[s.file]: The file is damaged. (co6)
If a file is damaged, try to edit the file again, or read
a backup copy. After fixing the file, run the
option and the repaired file name by entering:
admin -z s.file
This operation replaces the old checksum in the SCCS file header with
a new checksum based on the repaired file contents. Other SCCS commands can
now process the file.
The following environment variables affect the execution of
Provides a default value for the internationalization variables
that are unset or null. If
is unset or null, the corresponding value from the default locale is used.
If any of the internationalization variables contain an invalid setting, the
utility behaves as if none of the variables had been defined.
If set to a non-empty string value, overrides the values of
all the other internationalization variables.
Determines the locale for the interpretation of sequences
of bytes of text data as characters (for example, single-byte as opposed to
multibyte characters in arguments and input files).
Determines the locale for the format and contents of diagnostic
messages written to standard error.
Determines the location of message catalogues for the processing
Programming Support Tools
- Creating and Initializing SCCS Files
- Changing Existing SCCS Files
- Creating an SCCS File
- Header Flags
- EXIT STATUS
- ENVIRONMENT VARIABLES
- SEE ALSO
This document was created by
using the manual pages.
Time: 02:42:49 GMT, October 02, 2010