ADMIN(1s,C) AIX Commands Reference ADMIN(1s,C)
-------------------------------------------------------------------------------
admin
PURPOSE
Creates and initializes Source Code Control System (SCCS) files.
SYNTAX
+---------------------------+
+- -n ------------+ | +-- a --+ |
admin ---| +--------+ |---| +- l -|1 |----+ |--->
+- -i -|1 |-+ | 1| +- num -+ | |
+- name -+ +- -f -| ^ | |-+
| +--,--+ |
| one of |
| +--------------+ |
+-| b j |-+
| cnum mmodule |
| dSID n |
| fnum qtext |
| i ttype |
+--------------+
+-----------------------------------+ +----------+ +--- -r1.1 ---+
>---| +---- -fv -----+ +---- -m ----+ |---| 2|---| |--->
+-| |---| |-+ +- -auser -+ +- -rnum.num -+
+- -fvprogram -+ +- -mmrlist -+ ^ |
+--------+
+----------+ +-----------------+
>---| |---| +---- -y -----+ |--- s-file ---|
+- -tfile -+ +-| |-+ ^ |
+- -ycomment -+ +----------+
-----------------------------
1 Do not put a blank between these items.
2 If -a is never used to specify users,
any user can run get -e on the file.
To Change Existing SCCS Files:
Processed November 8, 1990 ADMIN(1s,C) 1
ADMIN(1s,C) AIX Commands Reference ADMIN(1s,C)
+---------------------------+
+------------+ | +-- a --+ |
admin ---| +--------+ |---| +- l -|1 |----+ |--->
+-| -auser |-+ | | +- num -+ | |
^| -euser || +- -f -|1 ^ | |-+
|+--------+| ^ | +--,--+ ||
+----------+ | | ||
| | +--------------+ ||
| +-| b j |-+|
| | cnum mmodule | |
| | dSID n | |
| | fnum qtext | |
| | i ttype | |
| +--------------+ |
+-------------------------+
+------------------------+
| +-- a --+ | +------------------+ +--------------+
>---| +- l -|1 |-+ |-| +---- -fv -----+ |-| +--- -t ---+ |-- file --|
| | +- num -+ | | +-+- -fvprogram -+-+ +-| |-+ A |
+- -d -|1 ^ | |-+ +---- -dv -----+ +- -tfile -+ +------+
^ | +--,--+ ||
| | one of ||
| | +------+ ||
| +----| b j |---+|
| | c m | |
| | d n | |
| | f q | |
| | i t | |
| +------+ |
+----------------------+
To Check and Correct Damaged SCCS Files:
one of
+----+
admin ---| -z |-- file --|
| -h | ^ |
+----+ +------+
-----------------
1 Do not put a blank between these items.
DESCRIPTION
The admin command creates new Source Code Control System (SCCS) files or
changes specified parameters in existing SCCS files. These parameters control
Processed November 8, 1990 ADMIN(1s,C) 2
ADMIN(1s,C) AIX Commands Reference ADMIN(1s,C)
how the get command builds the files that you can edit. They also provide
information about who can access the file, who can make changes, and when
changes were made.
If the named file exists, admin modifies its parameters as specified by the
flags. If it does not exist and you supply the -i or the -n flag, admin
creates the new file and provides default values for unspecified flags. If you
specify a directory name for file, admin performs the requested actions on all
SCCS files in that directory (all files with the s. prefix). If you specify a
- (minus) as a file name, admin reads standard input and interprets each line
as the name of an SCCS file. An end-of-file character (Ctrl-D) ends input.
The admin command is most often used to create new SCCS files without setting
parameters. See "Examples" for the syntax used to create an SCCS file with no
parameters set in the new file.
If you are not familiar with the delta numbering system, see AIX Operating
System Programming Tools and Interfaces for more information.
SCCS FILE CONVENTIONS
All SCCS file names must have the form s.name. New SCCS files are created with
read-only permission. You must have write permission in the directory to
create a file (see "chmod" for an explanation of file permissions). admin
writes to a temporary x-file, which it calls x.name. The x-file has the same
permissions as the original SCCS file if it already exists, and it is read-only
if admin creates a new file. After successful completion of admin, the x-file
is moved to the name of the SCCS file. This ensures that changes are made to
the SCCS file only if admin does not detect any errors while it is running.
Directories containing SCCS files should be created with permission code 755
(read, write, and execute permissions for owner, read and execute permissions
for group members and others). SCCS files themselves should be created 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, the directories should include group write permission.
The admin command also uses a temporary lock file (called z.name), to prevent
simultaneous updates to the SCCS file by different users. See "SCCS Files"
for additional information on the z.name file.
The following table contains the header flags that can be set with the -f flag
and unset with the -d flags (see page 5). The header flags control the
format of the g-file created with the get command (see "SCCS Files" for details
on the g-file).
Processed November 8, 1990 ADMIN(1s,C) 3
ADMIN(1s,C) AIX Commands Reference ADMIN(1s,C)
+-----------------------------------------------------------------------------+
|Figure 2 (Page 1 of 2). SCCS Header Flags |
+-----------------+-----------------------------------------------------------+
|Header | |
|Flag | Header Flag Purpose |
+-----------------+-----------------------------------------------------------+
|b | Lets you use the -b flag of a get command to create |
| | branch deltas. |
+-----------------+-----------------------------------------------------------+
|cnum | Makes num the highest release number that a get -e can |
| | use. The value of num must be less than or equal to |
| | 9999. (Its default value is 9999.) |
+-----------------+-----------------------------------------------------------+
|fnum | Makes num the lowest release number that a get -e can |
| | retrieve. num must be greater than 0 and less than 9999. |
| | (Its default value is 1.) |
+-----------------+-----------------------------------------------------------+
|dSID | Makes SID the default delta supplied to a get command. |
+-----------------+-----------------------------------------------------------+
|i | Treats the "No ID keywords (ge6)" message issued by the |
| | get or delta command as an error (see "Identification |
| | Keywords"). |
+-----------------+-----------------------------------------------------------+
|j | Permits concurrent get commands for editing the same SID |
| | of an SCCS file. This allows multiple concurrent updates |
| | to the same version of the SCCS file. |
+-----------------+-----------------------------------------------------------+
|lnum[,num]... | Locks the releases specified by num... against editing, |
| | so that a get -e against one of these releases fails. |
| | You can lock all releases against editing by specifying |
| | -fla and unlock specific releases with the -d flag. |
+-----------------+-----------------------------------------------------------+
|n | Causes delta 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. |
+-----------------+-----------------------------------------------------------+
|qtext | Substitutes text for all occurrences of the keyword |
| | in an SCCS text file retrieved by a get command. (See |
| | "Identification Keywords" for more information on |
| | keywords.) |
+-----------------+-----------------------------------------------------------+
|mmodule | Substitutes module for all occurrences of the admin.1s keyword |
| | in an SCCS text file retrieved by a get command. The |
| | default module is the name of the SCCS file without the |
| | s. prefix. |
+-----------------+-----------------------------------------------------------+
Processed November 8, 1990 ADMIN(1s,C) 4
ADMIN(1s,C) AIX Commands Reference ADMIN(1s,C)
+-----------------------------------------------------------------------------+
|Figure 2 (Page 2 of 2). SCCS Header Flags |
+-----------------+-----------------------------------------------------------+
|Header | |
|Flag | Header Flag Purpose |
+-----------------+-----------------------------------------------------------+
|ttype | Substitutes type for all keywords in a g-file |
| | retrieved by a get. |
+-----------------+-----------------------------------------------------------+
|v[program] | Makes delta prompt for Modification Request (MR) numbers |
| | as the reason for creating a delta. program specifies |
| | the name of an MR number validity checking program (see |
| | "delta"). If v is set in the SCCS file, the admin -m |
| | flag must also be used, even if its value is null. |
+-----------------+-----------------------------------------------------------+
FLAGS
You can enter the flags and input file names in any order. All flags apply to
all the files.
-auser Adds the specified user to the list of users who can make sets
of changes, or deltas, to the SCCS file. user 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 -a flag on a single
admin command line. If an SCCS file contains an empty user
list, anyone can add deltas.
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.
-dhdrflag Removes the specified header flag from the SCCS file. You can
specify this flag only with existing SCCS files. You can also
specify more than one -d flag in a single admin command. See
Figure 2 for the header flags that admin recognizes.
-euser 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 -e flags on a single admin command line.
-fhdrflag[value]
Places the specified header flag and value in the SCCS file.
You can specify more than one header flag in a single admin
command. See Figure 2 for the header flags that admin
recognizes.
Processed November 8, 1990 ADMIN(1s,C) 5
ADMIN(1s,C) AIX Commands Reference ADMIN(1s,C)
-h 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 has been improperly modified or has been damaged. This
flag helps you detect both accidental damage and damage caused
by the improper use of non-SCCS commands to modify SCCS files.
The -h flag prevents writing to the file, so it cancels the
effect of any other flags supplied. If an error message is
returned indicating the file is damaged, use the -z flag to
recompute the checksum. Then test to see if the file is
corrected by using the -h flag again.
-i[name] Gets the text for a new SCCS file from name. This text is the
first delta of the file. If you specify the -i flag but you
omit the file name, admin reads the text from standard input
until it reaches END OF FILE (Ctrl-D). If you do not specify
the -i flag, but you do specify the -n flag, admin creates an
empty SCCS file. admin can only create 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 -n flag. The SCCS files created
are empty.
-m[mrlist] Specifies a list of Modification Request (MR) numbers to be
inserted into the SCCS file as the reason for creating the
initial delta. The v flag must be set. The MR numbers are
validated if the v flag has a value (the name of an MR number
validation program). admin reports an error if the v flag is
not set or if MR validation fails.
-n Creates a new, empty SCCS file. Do not specify this flag when
you use the -i flag.
-rnum.num Inserts the initial delta into num.num, the release and version,
respectively. You can specify -r only if you also specify the
-i or -n flag. If you do not specify this flag, the initial
delta becomes release 1, version 1. Use this flag only when
creating an SCCS file.
-t[file] Takes descriptive text for the SCCS file from file. If you use
-t when creating a new SCCS file, you must supply a file name.
In the case of existing SCCS files:
o Without a file name, -t causes removal of the descriptive
text (if any) currently in the SCCS file.
o With a file name, -t causes text in the named file to
replace the descriptive text (if any) currently in the SCCS
file.
-y[comment] Inserts comment text into the initial delta in a manner
identical to that of the delta command. Use this flag only when
you create an SCCS file. If you do not specify a comment, admin
inserts a line of the following form:
Processed November 8, 1990 ADMIN(1s,C) 6
ADMIN(1s,C) AIX Commands Reference ADMIN(1s,C)
date and time created YY/MM/DD HH:MM:SS by login
-z Recomputes the SCCS file checksum and stores it in the first
line of the SCCS file (see the -h flag on page 6).
Warning: Using admin with this flag on a damaged file can
prevent future detection of the damage. This flag should only
be used if the SCCS file is changed using non-SCCS commands
because of a serious error.
EXAMPLES
1. To create an empty SCCS file named s.prog.c:
admin -n s.prog.c
2. To convert an existing text file into an SCCS file:
admin -iprogram.c s.prog.c
This converts the text file "program.c" into the SCCS file "s.prog.c". The
original file remains intact, but it is no longer needed. You must rename
or delete it before you can use the get command on "s.prog.c".
RELATED INFORMATION
See the following commands: "delta," "ed, red," "get," "sccshelp," "prs" and
"what."
See the sccsfile file in AIX Operating System Technical Reference.
See "Maintaining Different Versions of a Program" in AIX Operating System
Programming Tools and Interfaces.
Processed November 8, 1990 ADMIN(1s,C) 7