ADMIN(1P)
๐ธ ADMIN(1P) โ POSIX Programmer's Manual ๐ธ
okay bestie, this is ADMIN(1P) from the POSIX Programmer's Manual, and we're doing this whole thing together, no skipping, no skimming, we go line by line ๐
โจ PROLOG โจ
so like, real talk first: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ โ so if you're on Linux, go consult the corresponding Linux manual page for the details on Linux behavior. or honestly? the interface might not even be implemented on Linux at all. ๐ญ vibe check accordingly.
๐ NAME ๐
admin โ create and administer SCCS files (DEVELOPMENT)
๐ฆ SYNOPSIS ๐ฆ
admin -i[name] [-n] [-a login] [-d flag] [-e login] [-f flag]
[-m mrlist] [-r rel] [-t[name] [-y[comment]] newfile
admin -n [-a login] [-d flag] [-e login] [-f flag] [-m mrlist]
[-t[name]] [-y[comment]] newfile...
admin [-a login] [-d flag] [-m mrlist] [-r rel] [-t[name]] file...
admin -h file...
admin -z file...
five whole forms, she's versatile, she contains multitudes ๐
๐ DESCRIPTION ๐
okay so here's the tea. the admin utility shall create new SCCS files or change parameters of existing ones. that's the whole job, and she does it flawlessly.
if a named file does not exist, it shall be created, and its parameters shall be initialized according to the specified options. parameters that you didn't initialize with an option? they get assigned a default value. cute, automatic, slay.
if a named file does exist, then the parameters corresponding to the options you specified shall be changed, and every other parameter shall be left as is. she does not touch what she wasn't asked to touch. respectful queen. ๐
all SCCS filenames supplied by the application shall be of the form s.filename. periodt.
new SCCS files shall be given read-only permission mode. and heads up โ write permission in the parent directory is required to create a file. so if the parent dir isn't giving you write access, it's not happening, no cap.
okay this next part is the part that lowkey makes her iconic. all writing done by admin shall be to a temporary x-file, named x.filename (see get). that x-file gets created with:
- read-only mode, if
adminis creating a new SCCS file, or - the same mode as that of the SCCS file, if the file already exists.
and then, after successful execution of admin, the SCCS file shall be removed (if it exists), and the x-file shall be renamed with the name of the SCCS file.
๐ซถ this whole dance exists so that changes are made to the SCCS file only if no errors occur. transactional behavior before it was cool, honestly.
and finally, the admin utility shall also use a transient lock file, named z.filename, which is used to prevent simultaneous updates to the SCCS file. see get. ๐
she locks her stuff. she protects her stuff. main character energy fr fr ๐
โจ OPTIONS โจ
Okay bestie, listen up ๐
the admin utility is gonna follow the Base Definitions volume of POSIX.1โ2017, Section 12.2, Utility Syntax Guidelines โ except that -i, -t, and -y have optional option-arguments. And here's the little detail that trips people up: those optional option-arguments shall not be presented as separate arguments, so like, don't split them up, they stay glued to the flag okay?? ๐ซถ
The following options are supported:
-nโ Create a new SCCS file โจ. When-nis used without-i, the SCCS file shall be created with control information but without any file data.-i[name]โ Specify the name of a file from which the text for a new SCCS file shall be taken ๐. That text constitutes the first delta of the file (peep the-roption for the delta numbering scheme, iykyk). If-iis used but the name option-argument is omitted, the text shall be obtained by reading the standard input. If this option is omitted entirely, the SCCS file shall be created with control information but without any file data. Oh and โ the-ioption implies the-noption, no cap ๐ฅ.-r SIDโ Specify theSIDof the initial delta to be inserted. ThisSIDshall be a trunkSID; that is, the branch and sequence numbers shall be zero or missing. The level number is optional, and defaults to1.-t[name]โ Specify the name of a file from which descriptive text for the SCCS file shall be taken ๐. In the case of existing SCCS files (so when neither-inor-nis specified):- A
-toption without a name option-argument shall cause the removal of descriptive text (if any) currently in the SCCS file. - A
-toption with a name option-argument shall cause the text (if any) in the named file to replace the descriptive text (if any) currently in the SCCS file.
- A
-f flagโ Specify a flag, and, possibly, a value for the flag, to be placed in the SCCS file ๐. Several-foptions may be supplied on a singleadmincommand line. Implementations shall recognize the following flags and associated values:bโ Allow use of the-boption on agetcommand to create branch deltas ๐ฟ.cceilโ Specify the highest release (that is, ceiling), a number less than or equal to9999, which may be retrieved by agetcommand for editing. The default value for an unspecifiedcflag shall be9999.ffloorโ Specify the lowest release (that is, floor), a number greater than0but less than9999, which may be retrieved by agetcommand for editing. The default value for an unspecifiedfflag shall be1.dSIDโ Specify the default delta number (SID) to be used by agetcommand.istrโ Treat the ``No ID keywords'' message issued bygetordeltaas a fatal error ๐. In the absence of this flag, the message is only a warning. The message is issued if no SCCS identification keywords (seeget) are found in the text retrieved or stored in the SCCS file. If a value is supplied, the application shall ensure that the keywords exactly match the given string; however, the string shall contain a keyword, and no embedded<newline>characters.jโ Allow concurrentgetcommands for editing on the sameSIDof an SCCS file ๐. This allows multiple concurrent updates to the same version of the SCCS file.llistโ Specify a list of releases to which deltas can no longer be made (that is,get -eagainst one of these locked releases fails ๐). Conforming applications shall use the following syntax to specify a list. Implementations may accept additional forms as an extension:
<list> ::= a | <range-list>
<range-list> ::= <range> | <range-list>, <range>
<range> ::= <SID>
The character a in the list shall be equivalent to specifying all releases for the named SCCS file. The non-terminal <SID> in range shall be the delta number of an existing delta associated with the SCCS file.
nโ Causedeltato create a null delta in each of those releases (if any) being skipped when a delta is made in a new release (for example, in making delta5.1after delta2.7, releases3and4are skipped) ๐. These null deltas shall serve as anchor points so that branch deltas may later be created from them. The absence of this flag shall cause skipped releases to be nonexistent in the SCCS file, preventing branch deltas from being created from them in the future. During the initial creation of an SCCS file, thenflag may be ignored; that is, if the-roption is used to set the release number of the initialSIDto a value greater than1, null deltas need not be created for the ``skipped'' releases.qtextโ Substitute user-definable text for all occurrences of the%Q%keyword in the SCCS file text retrieved byget๐ฌ.mmodโ Specify the module name of the SCCS file substituted for all occurrences of the%M%keyword in the SCCS file text retrieved byget. If themflag is not specified, the value assigned shall be the name of the SCCS file with the leading'.'removed.ttypeโ Specify the type of module in the SCCS file substituted for all occurrences of the%Y%keyword in the SCCS file text retrieved byget๐.vpgmโ Causedeltato prompt for modification request (MR) numbers as the reason for creating a delta. The optional value specifies the name of an MR number validation program. (If this flag is set when creating an SCCS file, the application shall ensure that themoption is also used even if its value is null.) ๐
-d flagโ Remove (delete) the specified flag from an SCCS file ๐๏ธ. Several-doptions may be supplied on a singleadmincommand. See the-foption for allowable flag names. (Thellistflag gives a list of releases to be unlocked. See the-foption for further description of thelflag and the syntax of a list.)-a loginโ Specify a login name, or numerical group ID, to be added to the list of users who may make deltas (changes) to the SCCS file ๐ซถ. A group ID shall be equivalent to specifying all login names common to that group ID. Several-aoptions may be used on a singleadmincommand line. As many logins, or numerical group IDs, as desired may be on the list simultaneously. If the list of users is empty, then anyone may add deltas ๐ณ. If login or group ID is preceded by a'!', the users so specified shall be denied permission to make deltas.-e loginโ Specify a login name, or numerical group ID, to be erased from the list of users allowed to make deltas (changes) to the SCCS file โ๏ธ. Specifying a group ID is equivalent to specifying all login names common to that group ID. Several-eoptions may be used on a singleadmincommand line.-y[comment]โ Insert the comment text into the SCCS file as a comment for the initial delta in a manner identical to that ofdelta๐. In the POSIX locale, omission of the-yoption shall result in a default comment line being inserted in the form:
"date and time created %s %s by %s", <date>, <time>, <login>
where <date> is expressed in the format of the date utility's %y/%m/%d conversion specification, <time> in the format of the date utility's %T conversion specification format, and <login> is the login name of the user creating the file.
-m mrlistโ Insert the list of modification request (MR) numbers into the SCCS file as the reason for creating the initial delta in a manner identical todelta๐ข. The application shall ensure that thevflag is set and the MR numbers are validated if thevflag has a value (the name of an MR number validation program). A diagnostic message shall be written if thevflag is not set or MR validation fails.-hโ Check the structure of the SCCS file and compare the newly computed checksum with the checksum that is stored in the SCCS file ๐ต๏ธ. If the newly computed checksum does not match the checksum in the SCCS file, a diagnostic message shall be written.-zโ Recompute the SCCS file checksum and store it in the first line of the SCCS file (see the-hoption above) โป๏ธ.
Heads up bestie!! Note that use of this option on a truly corrupted file may prevent future detection of the corruption ๐ญ. Like, it'll paper over the crime scene. Be careful.
๐ธ OPERANDS ๐ธ
The following operands shall be supported:
- file โ A pathname of an existing SCCS file or a directory ๐. If file is a directory, the
adminutility shall behave as though each file in the directory were specified as a named file, except that non-SCCS files (last component of the pathname does not begin withs.) and unreadable files shall be silently ignored ๐คซ. - newfile โ A pathname of an SCCS file to be created โจ.
If exactly one file or newfile operand appears, and it is '-', the standard input shall be read; each line of the standard input shall be taken to be the name of an SCCS file to be processed ๐ฅ. Non-SCCS files and unreadable files shall be silently ignored.
๐ STDIN ๐
The standard input shall be a text file used only if -i is specified without an option-argument or if a file or newfile operand is specified as '-' ๐.
โ ๏ธ If the first character of any standard input line is <SOH> in the POSIX locale, the results are unspecified ๐. Like, undefined behaviour, we don't make the rules, we just warn you about them.
okay bestie</p>, we're in the home stretch โ this is the part where the page stops telling you what to do and starts telling you what the system is gonna do back. ๐
๐ INPUT FILES
So the SCCS files that already exist? They're text files, but of an unspecified format. That's the standard's way of saying "they're text, don't @ me about the layout." ๐
The application has to make sure the file named by the -i option's option-argument is a text file. And here's the cursed bit: if the first character of any line in that file is <SOH> in the POSIX locale, the results are unspecified. unspecified!! Not "an error," not "it warns you" โ just vibes-based, do-not-trust, who-knows. ๐ญ
And if that file has more than 99999 lines? The number of lines recorded in the header for this file shall be 99999 for this delta. Capped. Periodt. No matter how many lines you actually fed it. ๐
๐ ENVIRONMENT VARIABLES
These are the environment variables that shall affect how admin runs:
LANGโ gives you a default value for the internationalization variables that are unset or null. (Peep the Base Definitions volume of POSIX.1-2017, Section 8.2, Internationalization Variables for the precedence order used to figure out the values of locale categories. iykyk ๐ซถ)LC_ALLโ if it's set to a non-empty string value, it overrides the values of all the other internationalization variables. absolute main character energy, it just overrules everyone. ๐LC_CTYPEโ decides the locale for interpreting sequences of bytes of text data as characters. think single-byte vs multi-byte characters in arguments and input files. ๐ฆLC_MESSAGESโ decides the locale that affects the format and contents of diagnostic messages written to standard error, and the contents of the default-ycomment. yes, your comment gets localized too. ๐NLSPATHโ decides where the message catalogs live for the processing ofLC_MESSAGES. ๐
โก ASYNCHRONOUS EVENTS
Default.
That's it. That's the whole section. slay. โจ
๐ค STDOUT
Not used.
Nothing comes out of here. Not one crumb. ๐
๐ฅ STDERR
Standard error shall be used only for diagnostic messages. It's the venting channel, bestie โ nothing else gets to live there. ๐ญ
๐พ OUTPUT FILES
Any SCCS files that get created shall be text files of an unspecified format. (same energy as before: text, but don't ask about the layout ๐)
And here's a lil behind-the-scenes thing: during processing of a file, a locking z-file โ as described in get โ may be created and deleted. It comes, it does its job, it dips. iconic behavior. โจ
๐งฉ EXTENDED DESCRIPTION
None. ๐
๐ฆ EXIT STATUS
Here's what you get back:
0โ Successful completion. ๐>0โ An error occurred. ๐
๐ซ CONSEQUENCES OF ERRORS
Default.
And then โ plot twist โ the page literally says this:
The following sections are informative.
meaning: everything after this point is context and commentary, not requirements. we're in the โจbonus contentโจ era now. ๐ฆ
๐ ๏ธ APPLICATION USAGE
The page recommends (so, strong suggestion, bestie, take the note ๐):
- directories containing SCCS files should be writable by the owner only
- the SCCS files themselves should be read-only
- the mode of those directories should let only the owner modify the SCCS files inside them
- the mode of the SCCS files themselves prevents any modification at all except by SCCS commands
basically: lock your room, keep the diaries read-only, and only the SCCS commands have the key. ๐
๐ซ EXAMPLES
None. (crying, we wanted a demo ๐ญ)
๐ง RATIONALE
None.
๐ฎ FUTURE DIRECTIONS
None.
๐ SEE ALSO
deltagetprswhat- The Base Definitions volume of POSIX.1-2017, Chapter 8, Environment Variables, Section 12.2, Utility Syntax Guidelines
go read get btw, it's where that whole locking z-file thing is explained. ๐ซถ
โ๏ธ COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.
And the serious part, no jokes: in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html. ๐
and that's the whole page, bestie!! this one came from IEEE/The Open Group, dated 2017, and its name in the wild is ADMIN(1P). ๐โจ๐ you made it to the end, so proud of you โ go lock down those SCCS directories fr fr. ๐ฆ๐
๐
๐ฆ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 ยท custom
- alpine 3.23: man-pages-posix 2017a-r0 ยท custom
- alpine 3.24: man-pages-posix 2017a-r0 ยท custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 ยท SUSE-IEEE
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms