sccs-admin(1)
Okay bestie, this is sccs-admin(1) β aka admin β a User Commands manual page, and it's all about creating and administering SCCS history files. There are so many flags here, but we're gonna take it step by step. π
πΈ NAME πΈ
sccs-admin, admin β create and administer SCCS history files π«Ά
β¨ SYNOPSIS β¨
/usr/ccs/bin/admin [-bhknoz] [-a username | groupid]...
[-d flag] ... [-e username | groupid ]...
[-f flag[value]] ... [-i[filename]] [-m mr-list]
[-q[nsedelim]] [-w%W%-string]
[-rrelease] [-t[description-file]] [-y[comment]]
[-Xextended-options] [-Nbulk-spec] s.filename...
π DESCRIPTION π
Okay so the admin command creates or modifies the flags and other parameters of SCCS history files. Filenames of SCCS history files begin with the s. prefix, and they're called s.files, or βhistoryβ files. π
The named s.file gets created if it doesn't already exist. Its parameters are initialized or modified according to the options you specify. Parameters you don't specify get default values when the file is initialized β otherwise they stay unchanged. Simple as that. β¨
If a directory name is used in place of the s.filename argument, the admin command applies to all s.files in that directory. Unreadable s.files produce an error. And using β as the s.filename argument means the names of files are read from the standard input, one s.file per line. π«Ά
π OPTIONS π
The following options are supported, bestie:
-a username | groupidβ Adds a user name, or a numerical group ID, to the list of users who may check deltas in or out. If the list is empty, any user is allowed to do so. π-bβ Forces encoding of binary data. Files that containASCII NUL, that contain lines that start with the SCCS control characterSOH(ASCII 001), or that do not end with aNEWLINE, are recognized as binary data files when using theSCCSv4history file format. The contents of such files are stored in the history file in encoded form. Seeuuencode(1C)for details about the encoding. This option is normally used in conjunction with-ito forceadminto encode initial versions not recognized as containing binary data. π₯
The new SCCSv6 history file format permits having lines that start with the SCCS control character SOH(ASCII 001) and files that do not end with a NEWLINE, enforcing the binary file format only if a file contains ASCII NUL characters. β¨
-d flagβ Deletes the indicated flag from the SCCS file. The-doption may be specified only for existings.files. See-ffor the list of recognized flags. π§-e username | groupidβ Erases a user name or group ID from the list of users allowed to make deltas. π-f flag [value]β Sets the indicated flag to the (optional) value specified. The following flags are recognized:
π recognized -f flags π
bβ Enables branch deltas. Whenbis set, branches can be created using the-boption of the SCCS get command (seesccs-get(1)). πcceilβ Sets a ceiling on the releases that can be checked out.ceilis a number less than or equal to9999. Ifcis not set, the ceiling is9999. πdsidβ Specifies the default delta number, or SID, to be used by an SCCS get command. βffloorβ Sets a floor on the releases that can be checked out. The floor is a number greater than0but less than9999. Iffis not set, the floor is1. π¦i[value]β Treats theNo id keywords (cm7)message issued by an SCCS get or delta command as an error rather than a warning. π
If the parameter value to the i flag is not empty, then it holds a line fragment with keywords starting with a %, e.g. %Z%%M% %I% %E%.
This line fragment needs to exactly match a part of a line in the file and to result in expanded keywords. The string must begin with a keyword, and may not have embedded newline characters. If no match was found, an attempt to check in a new delta will fail. The parameter to the i flag is a SUN extension that was adopted by the POSIX standard. π
jβ Allow concurrentget -ecalls for editing on the same base SID of an SCCS file. This allows multiple concurrent updates to take place on the same version of the SCCS file. π₯laβ this one shows up as its own line in the original, right before thelentry; thealist member gets explained right below withl. πl release[, release...]β Locks the indicated list of releases against deltas. An SCCSget -ecommand fails when applied against a locked release. The following syntax is accepted to specify a list:
<list> ::= a | <range-list>
<range-list> ::= <range> | <range-list>, <range>
<range> ::= <SID>
The character a in the list is the equivalent to specifying all releases for the named SCCS file. The non-terminal <SID> in range is the delta number of an existing delta associated with the SCCS file. π«Ά
mmoduleβ Supplies a value for the module name to which the%M%keyword is to expand. If themflag is not specified, the value assigned is the name of the SCCS file with the leadings.removed. πΈnβ Creates empty releases when releases are skipped. These null (empty) deltas serve as anchor points for branch deltas. πqvalueβ Supplies a value to which the%Q%keyword is to expand when a read-only version is retrieved with the SCCS get command. πsnumberβ Specifies how many lines of code are scanned for the SCCS keyword.
This flag is a SUN extension that does not exist in historic sccs implementations. β¨
ttypeβ Supplies a value for the module type to which the%Y%keyword is to expand. π¦v[program]β Specifies a validation program for the MR numbers associated with a new delta. The optionalprogramspecifies the name of an MR number validity checking program. If this flag is set when creating an SCCS file, the-moption must also be used, in which case the list of MRs may be empty.
Thevflag and thezflag are mutually exclusive. π
xβ Enable sccs extensions that are not implemented in classical sccs variants. If thexflag is enabled, the keywords%d%,%e%,%g%and%h%are expanded even though theyflag was not set.
This flag is a SCHILY extension that does not exist in historic sccs implementations. π
This version of SCCS implements compatibility support for a SCO SCCS extension that sets the executable bit in the file permissions of a gotten file if the x-flag was set in the history file with no parameter. This version of SCCS does not allow this variant of setting the x-flag in the history file. If you like to get executable files from SCCS, set the executable bit in the file permissions of the history file. π
y[value,[value]]β Specifies the SCCS keywords to be expanded. If no value is specified, no keywords will be expanded.
The value * controls the expansion of the %sccs.include.filename% keyword. If the letters d, e, g or h are present, the related extended keywords are expanded even though the x flag was not set, see x flag above. β¨
If value is set to an empty string, no keywords will be expanded and the No id keywords (cm7) message will not be created even though no keyword was expanded.
admin(1) automatically disables keyword expansion when creating a SCCSv6 history file and a nul byte is seen in the input data. π
This flag is a SUN/SCHILY extension that does not exist in historic sccs implementations.
The suppressed No id keywords (cm7) message is a SCHILY extension. π
zapplicationβ The name of an application for the CMF enhancements. CMF enhancements are currently undocumented and it is not known how they are expected to work. π
Thevflag and thezflag are mutually exclusive.
This flag is a SUN extension that does not exist in historic sccs implementations. π
-hβ Checks the structure of an existings.file(seesccsfile(5)), and compares a newly computed check-sum with one stored in the first line of that file.-hinhibits writing on the file and so nullifies the effect of any other options.
Bestie, that's a big deal: -h means no writing, so every other option gets canceled out. π
-i[filename]β Initializes the history file with text from the indicated file. This text constitutes the initial delta, or set of checked-in changes. Iffilenameis omitted, the initial text is obtained from the standard input. Omitting the-ioption altogether creates an emptys.file. You can only initialize ones.filewith text using-iunless you use the bulk option-N. The-ioption implies the-noption. π«Ά
If you like to initialize more than one s.file in one call, use the -N option and specify -i. (-i followed by a dot). β¨
-kβ Suppresses expansion of ID keywords whenadmin(1)is doing an implicitget(1)operation because-N+...was specified.
This option is a SCHILY extension that does not exist in historic sccs implementations. πΈ
-m mr-listβ Inserts the indicated Modification Request (MR) numbers into the commentary for the initial version. When specifying more than one MR number on the command line,mr-listtakes the form of a quoted, space-separated list. A warning results if thevflag is not set or the MR validation fails. π₯-Nbulk-specβ Creates a bulk of new SCCS history files. This option allows one to do an efficient mass creation of SCCS history files and to initialize the SCCS history files from named files that are the respective counterpart to the actual SCCS history file. π
The bulk-spec parameter is composed from an optional list of flag parameters followed by an optional path specifier. π
π© the flag types you can pop onto bulk-spec β¨
These go in front of your bulk-spec, and each one does a different lil thing. Pick wisely bestie π
-β if bulk-spec is preceded by a-,admin(1)removes the original g-files after the initial history files have been created. ποΈ Big deal: this flag cannot be used together with the,flag. Not combinable, periodt.+β if bulk-spec is preceded by a+,admin(1)removes the original g-files and replaces them by file content that is retrieved by aget(1)operation on the related s.file. π This one can be used together with the,flag. Slay.,β if bulk-spec is preceded by a,,admin(1)renames the g-file from where the SCCS history file was initialized from to,name, similar to what happens withsccs create. It is recommended to letadmin(1)rename the original file, because this file usually contains unexpanded keywords and it usually is writable. π Trust the process.- space β this is a placeholder dummy flag π«₯ that allows one to use a prepared string for the
-Noption and to replace the space character by one of the supported flags on demand.
If sccs is used in forced delta mode where no sccs edit is needed, it is recommended to use no flag character in the bulk-spec in order to retain a writable g-file. π
π€οΈ the path specifier types
These tell admin(1) what your file name arguments actually are β like, the vibe check for your paths π
-Nβ the file name parameters to theadmincommand are nots.filenamefiles but the names of the g-files. Thes.filenamenames are automatically derived from the g-file names by prependings.to the last path name component. Boths.filenameand the g-file are in the same directory. π-Ns.β the file name parameters to theadmincommand ares.filenamefiles. The g-files names are automatically derived by removings.from the beginning of last path name component of thes.filename. Boths.filenameand the g-file are in the same directory. ποΈ-Ndirβ the file name parameters to theadmincommand are nots.filenamefiles but the names of the g-files. Thes.filenamenames are put into directory dir, the names are automatically derived from the g-file names by prependingdir/s.to the last path name component. π¦-Ndir/s.β the file name parameters to theadmincommand ares.filenamefiles in directory dir. The g-files names are automatically derived by removingdir/s.from the beginning of last path name component of thes.filename. π
A typical value for dir is SCCS. π
In order to overcome the limited number of exec(2) arguments, it is recommended to use β as the file name parameter for admin(1) and to send a list of path names to stdin. If admin(1) is called via sccs(1), it is recommended to leave out the β to prevent sccs(1) from trying to expand the file names from stdin into an arg vector. Like, don't double-expand, it's giving chaos π
This option is a SCHILY extension that does not exist in historic sccs implementations. π§
πΈ the rest of the options
-nβ creates a new SCCS history file. β¨-oβ use the original time of the existing file for the delta time when creating a news.file. In NSE mode, this is the default behavior. Ifadmin(1)is doing an implicitget(1)operation because-N+...was specified, the new g-file is also set to the original file date. β° lowkey thoughtful of it.
This option is a SCHILY extension that does not exist in historic sccs implementations.
-q[nsedelim]β enable NSE mode. If NSE mode is enabled, several NSE related extensions may be used. In this release, the value of nsedelim is ignored. π In NSE mode,adminbehaves as if the-ooption was specified and never issues a warning about missing id keywords. Iconic, honestly.
This option is an undocumented SUN extension that does not exist in historic sccs implementations.
-rreleaseβ specifies the release for the initial delta.-rmay be used only in conjunction with-i. The initial delta is inserted into release1if this option is omitted. The level of the initial delta is always1. Initial deltas are named1.1by default. π’-t[description-file]β inserts descriptive text from the file description-file. When-tis used in conjunction with-n, or-ito initialize a news.file, the description-file must be supplied. π«Ά When modifying the description for an existing file: a-toption without a description-file removes the descriptive text, if any; a-toption with a description-file replaces the existing text. Out with the old, in with the new π-w%W%-stringβ the%W%-stringis used as a replacement for the%W%keyword whenadmin(1)is doing an implicitget(1)operation because-N+...was specified. If-wwas not specified,%W%is expanded to%Z%%M% %I%, otherwise the argument from-wis used. π―
This option is an undocumented SUN extension that does not exist in historic sccs implementations.
-Xextended-optionsβ specify extended options. The argument extended-options may be a comma separated list of extended option names. π₯
The following extended options are supported, they may be abbreviated as long as the abbreviation is still unique. β οΈ Options with a parameter may not be abbreviated.
Gp=initial_pathβ set the initial path meta data in the history file. If specified with an empty argument, no initial path meta data will appear in the history file. This option exists in order to permitcomb(1)to retain the initial path from the original file. If this option was specified, only one file type argument is permitted. π§Gr=urandβ set the unified random meta data in the history file. If specified with an empty argument, no unified random meta data will appear in the history file. This option exists in order to permitcomb(1)to retain the unified random from the original file. If this option was specified, only one file type argument is permitted. π²date=datetimeβ allows one to overwrite the usual methods to determine the time stamp used for a new delta. This is needed to e.g. convert a historic SCCS history into a new project oriented bundle history. The format of the datetime argument is the same as for cutoff times but nanoseconds and a time zone offset are permitted in addition. πgpath=g-pathβ specify a different path to the g-file instead of deriving the path from the s-file using an algorithm that may not apply in a specific case. This option is needed to manage the changeset file. π£οΈnobulkβ disables the-N(bulkmode) filename translations. This is needed to disable a-Noption that is automatically added bysccs(1)in NewMode and would otherwise make it impossible to deal with the changeset file.sccs/SCCS/s.changeset. π«mail=addressβ set address as e-mail address in the delta table for the SID in case the history file has just been created withadmin. π§unlinkβ if used together with the option-n, this makes the initial release a special release that unlinks (removes) the g-file by using theget(1)command in case the file exists as non-writable file. The default SID used in this case is1.0, in order to permit a1.1release with file content later in the same history file. πuser=nameβ use a different user name for the programmer field in the delta table. By default, the logname is used for this field. Using a different name may however later deny the permission to modify a delta by programs likecdc(1). Careful, bestie π¬0β when reading filenames from stdin, triggered by a file name argument-, the filename separator is a null byte instead of a newline. This allows one to use long lists with arbitrary filenames. π«Άhelpβ print a short online help for available options. π
The-Xoption is a SCHILY extension that does not exist in historicsccsimplementations.
-V,-version,--versionβ prints theadminversion number string and exists. π·οΈ
This option is a SCHILY extension that does not exist in historic sccs implementations.
-V4β when used together with-ior-n,admin(1)will create a SCCS v4 history file instead of the default, that may be SCCS v6. 4οΈβ£-V6β when used together with-ior-n,admin(1)will create a SCCS v6 history file instead of a SCCS v4 history file. 6οΈβ£
SCCS v6 history files are the default in case that a directory projecthome/.sccs/ has been created before and correctly populated and admin(1) has been called with the -N option to select the new mode. π
SCCS v6 history files are not understood by historic SCCS implementations. β οΈ See sccsfile(5) for more information on the new features.
This option is a SCHILY extension that does not exist in historic sccs implementations.
-y[comment]β inserts the indicated comment in the ``Comments:'' field for the initial delta. Valid only in conjunction with-ior-n. If-yoption is omitted, a default comment line is inserted that notes the date and time the history file was created. π¬-zβ recomputes the file check-sum and stores it in the first line of thes.file.
β οΈ Caution: it is important to verify the contents of the history file (seesccs-val(1), and thesccs(1)), since using-zon a truly corrupted file may prevent detection of the error. Like, fr fr, don't just raw-dog-zon a sus file π¨
β¨ EXAMPLES β¨
Example 1: Preventing SCCS keyword expansion π
Okay so in this one, 10 lines of file get scanned and only the W,Y,X keywords will be interpreted. Slay.
example% sccs admin -fs10 file
example% sccs admin -fyW,Y,X file
example% get file
Example 2: Preventing SCCS keyword expansion and suppressing the No id keywords (cm7) warning π
Here, no keywords will be interpreted and no warning will be generated. Iconic, honestly.
example% sccs admin -fy file
example% get file
Example 3: Mass entering files with auto-initialization π¦
In this example, all files in the usr/src tree will be put under SCCS, and the SCCS history files will be put into SCCS sub directories:
example% find usr/src -type f | sccs admin -NSCCS -i.
The original g-files will be left untouched. No cap.
Example 4: Mass entering files with auto-initialization π§
In this example, all files in the usr/src tree will be put under SCCS, and the SCCS history files will be put into SCCS sub directories. Each original file will be renamed to ,file after the file has been successfully put under SCCS control:
example% find usr/src -type f | sccs admin -N,SCCS -i.
Example 5: Entering all files in a directory with auto-initialization π
In this example, all files in the current directory will be put under SCCS, and the SCCS history files will be put into the SCCS sub directory:
example% sccs admin -NSCCS -i. .
The original g-files will be left untouched. Again. We love consistency π.
π± ENVIRONMENT VARIABLES π±
See environ(7) for descriptions of the following environment variables that affect the execution of admin(1): LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES, and NLSPATH.
SCCS_NO_HELPβ if set,admin(1)will not automatically callhelp(1)with the SCCS error code in order to print a more helpful error message. Scripts that depend on the exact error messages of SCCS commands should set the environment variableSCCS_NO_HELPand setLC_ALL=C. Very βdonβt touch my error textβ energy π.SCCS_V6β if set,admin(1)by default creates new history files with SCCS v6 encoding. Okayyy, v6 era β¨.
π EXIT STATUS π
The following exit values are returned:
0β Successful completion. We love a win π«Ά.1β An error occurred. Not the vibe π.
π FILES π
e.fileβ temporary file to hold an uuencoded version of the g-file in case of an encoded history file.s.fileβ SCCS history file, seesccsfile(5).SCCS/s.fileβ history file in SCCS subdirectory.x.fileβ temporary copy of thes.file; renamed to thes.fileafter completion.z.fileβ temporary lock file contains the binary process id in host byte order followed by the host name.dump.coreβ if the filedump.coreexists in the current directory and a fatal signal is received, a coredump is initiated viaabort(3).
π ATTRIBUTES π
See attributes(7) for descriptions of the following attributes:
- Availability β
SUNWsprot - Interface Stability β
Standard
π₯ SEE ALSO π₯
sccs(1), sccs-add(1), sccs-branch(1), sccs-cdc(1), sccs-check(1), sccs-clean(1), sccs-comb(1), sccs-commit(1), sccs-create(1), sccs-cvt(1), sccs-deledit(1), sccs-delget(1), sccs-delta(1), sccs-diffs(1), sccs-edit(1), sccs-editor(1), sccs-enter(1), sccs-fix(1), sccs-get(1), sccs-help(1), sccs-histfile(1), sccs-info(1), sccs-init(1), sccs-istext(1), sccs-ldiffs(1), sccs-log(1), sccs-print(1), sccs-prs(1), sccs-prt(1), sccs-rcs2sccs(1), sccs-remove(1), sccs-rename(1), sccs-rmdel(1), sccs-root(1), sccs-sact(1), sccs-sccsdiff(1), sccs-status(1), sccs-tell(1), sccs-unedit(1), sccs-unget(1), sccs-val(1), bdiff(1), diff(1), what(1), sccschangeset(5), sccsfile(5), attributes(7), environ(7), standards(7). Thatβs the whole bestie directory, iykyk π.
π DIAGNOSTICS π
Use the SCCS help command for explanations (see sccs-help(1)). Itβs giving βask the help girlieβ energy.
π¨ WARNINGS π¨
The last component of all SCCS filenames must have the s. prefix. New SCCS files are given mode 444 (see chmod(1)). All writing done by admin is to a temporary file with an x. prefix, created with mode 444 for a new SCCS file, or with the same mode as an existing SCCS file. After successful execution of admin, the existing s.file is removed and replaced with the x.file. This ensures that changes are made to the SCCS file only when no errors have occurred. Periodt, thatβs the whole safety arc π«Ά.
It is recommended that directories containing SCCS files have permission mode 755, and that the s.files themselves have mode 444. The mode for directories allows only the owner to modify the SCCS files contained in the directories, while the mode of the s.files prevents all modifications except those performed using SCCS commands.
β οΈ If it should be necessary to patch an SCCS file for any reason, the mode may be changed to644by the owner to allow use of a text editor. However, extreme care must be taken when doing this. The edited file should always be processed by anadmin -hcommand to check for corruption, followed by anadmin -zcommand to generate a proper check-sum. Anotheradmin -hcommand is recommended to ensure that the resultings.fileis valid. Do not skip the check-sum step, bestie, I am literally begging π.
admin uses a temporary lock file, starting with the z. prefix, to prevent simultaneous updates to the s.file. See sccs-get(1) for further information about the z.file.
π BUGS π
None currently known. Clean.
Mail bugs and suggestions to schilytools@mlists.in-berlin.de or open a ticket at https://codeberg.org/schilytools/schilytools/issues.
The mailing list archive may be found at:
https://mlists.in-berlin.de/mailman/listinfo/schilytools-mlists.in-berlin.de.
πΈ AUTHORS πΈ
The SCCS suite was originally written by Marc J. Rochkind at Bell Labs in 1972. Release 4.0 of SCCS, introducing new versions of the programs admin(1), get(1), prt(1), and delta(1) was published on February 18, 1977; it introduced the new text based SCCS v4 history file format (previous SCCS releases used a binary history file format). The SCCS suite was later maintained by various people at AT&T and Sun Microsystems. Since 2006, the SCCS suite has been maintained by Joerg Schilling and the schilytools project authors. A whole lineage, honestly π.
π¦ SOURCE DOWNLOAD π¦
The source code for sccs is included in the schilytools project and may be retrieved from the schilytools project at Codeberg at
https://codeberg.org/schilytools/schilytools.
The download directory is
https://codeberg.org/schilytools/schilytools/releases.
xoxo, your Unix bestie π β this page is SunOS 5.11, dated 2022/10/06, and itβs sccs-admin(1), obviously. Slay.
π¦ where this page comes from
- opensuse-leap 16.0: sccs 2022.10.16-160000.2.2 Β· CDDL-1.0
- opensuse-leap 16.0: sccs 2022.10.16-160000.2.2 Β· CDDL-1.0
- opensuse-leap 16.0: sccs 2022.10.16-160000.2.2 Β· CDDL-1.0
- opensuse-leap 16.0: sccs 2022.10.16-160000.2.2 Β· CDDL-1.0
- Copyright 2007-2020 J. Schilling
- Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms