SCCS(1)                    POSIX Programmer's Manual                   SCCS(1)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       sccs -- front end for the SCCS subsystem (DDEEVVEELLOOPPMMEENNTT)

SSYYNNOOPPSSIISS
       sccs [[-r]] [[-d _p_a_t_h]] [[-p _p_a_t_h]] _c_o_m_m_a_n_d [[_o_p_t_i_o_n_s...]] [[_o_p_e_r_a_n_d_s...]]

DDEESSCCRRIIPPTTIIOONN
       The _s_c_c_s utility is a front end to the SCCS programs. It also includes
       the capability to run set-user-id to another user to provide additional
       protection.

       The _s_c_c_s utility shall invoke the specified _c_o_m_m_a_n_d with the specified
       _o_p_t_i_o_n_s and _o_p_e_r_a_n_d_s.  By default, each of the _o_p_e_r_a_n_d_s shall be
       modified by prefixing it with the string ""SSCCCCSS//ss.."".

       The _c_o_m_m_a_n_d can be the name of one of the SCCS utilities in this volume
       of POSIX.1-2017 (_a_d_m_i_n, _d_e_l_t_a, _g_e_t, _p_r_s, _r_m_d_e_l, _s_a_c_t, _u_n_g_e_t, _v_a_l, or
       _w_h_a_t) or one of the pseudo-utilities listed in the EXTENDED DESCRIPTION
       section.

OOPPTTIIOONNSS
       The _s_c_c_s utility shall conform to the Base Definitions volume of
       POSIX.1-2017, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s, except that
       _o_p_t_i_o_n_s operands are actually options to be passed to the utility named
       by _c_o_m_m_a_n_d.  When the portion of the command:


           _c_o_m_m_a_n_d [[_o_p_t_i_o_n_s ... ]] [[_o_p_e_r_a_n_d_s ... ]]

       is considered, all of the pseudo-utilities used as _c_o_m_m_a_n_d shall
       support the Utility Syntax Guidelines. Any of the other SCCS utilities
       that can be invoked in this manner support the Guidelines to the extent
       indicated by their individual OPTIONS sections.

       The following options shall be supported preceding the _c_o_m_m_a_n_d operand:

       --dd _p_a_t_h   A pathname of a directory to be used as a root directory for
                 the SCCS files. The default shall be the current directory.
                 The --dd option shall take precedence over the _P_R_O_J_E_C_T_D_I_R
                 variable. See --pp.

       --pp _p_a_t_h   A pathname of a directory in which the SCCS files are
                 located. The default shall be the SSCCCCSS directory.

                 The --pp option differs from the --dd option in that the --dd
                 option-argument shall be prefixed to the entire pathname and
                 the --pp option-argument shall be inserted before the final
                 component of the pathname. For example:


                     sccs -d /x -p y get a/b

                 converts to:


                     get /x/a/y/s.b

                 This allows the creation of aliases such as:


                     alias syssccs="sccs -d /usr/src"

                 which is used as:


                     syssccs get cmd/who.c

       --rr        Invoke _c_o_m_m_a_n_d with the real user ID of the process, not any
                 effective user ID that the _s_c_c_s utility is set to. Certain
                 commands (_a_d_m_i_n, cchheecckk, cclleeaann, ddiiffffss, iinnffoo, _r_m_d_e_l, and tteellll)
                 cannot be run set-user-ID by all users, since this would
                 allow anyone to change the authorizations. These commands are
                 always run as the real user.

OOPPEERRAANNDDSS
       The following operands shall be supported:

       _c_o_m_m_a_n_d   An SCCS utility name or the name of one of the pseudo-
                 utilities listed in the EXTENDED DESCRIPTION section.

       _o_p_t_i_o_n_s   An option or option-argument to be passed to _c_o_m_m_a_n_d.

       _o_p_e_r_a_n_d_s  An operand to be passed to _c_o_m_m_a_n_d.

SSTTDDIINN
       See the utility description for the specified _c_o_m_m_a_n_d.

IINNPPUUTT FFIILLEESS
       See the utility description for the specified _c_o_m_m_a_n_d.

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       The following environment variables shall affect the execution of _s_c_c_s:

       _L_A_N_G      Provide a default value for the internationalization
                 variables that are unset or null. (See the Base Definitions
                 volume of POSIX.1-2017, _S_e_c_t_i_o_n _8_._2, _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n
                 _V_a_r_i_a_b_l_e_s for the precedence of internationalization
                 variables used to determine the values of locale categories.)

       _L_C___A_L_L    If set to a non-empty string value, override the values of
                 all the other internationalization variables.

       _L_C___C_T_Y_P_E  Determine the locale for the interpretation of sequences of
                 bytes of text data as characters (for example, single-byte as
                 opposed to multi-byte characters in arguments and input
                 files).

       _L_C___M_E_S_S_A_G_E_S
                 Determine the locale that should be used to affect the format
                 and contents of diagnostic messages written to standard
                 error.

       _N_L_S_P_A_T_H   Determine the location of message catalogs for the processing
                 of _L_C___M_E_S_S_A_G_E_S.

       _P_R_O_J_E_C_T_D_I_R
                 Provide a default value for the --dd _p_a_t_h option. If the value
                 of _P_R_O_J_E_C_T_D_I_R begins with a <slash>, it shall be considered
                 an absolute pathname; otherwise, the value of _P_R_O_J_E_C_T_D_I_R is
                 treated as a user name and that user's initial working
                 directory shall be examined for a subdirectory ssrrcc or ssoouurrccee.
                 If such a directory is found, it shall be used. Otherwise,
                 the value shall be used as a relative pathname.

       Additional environment variable effects may be found in the utility
       description for the specified _c_o_m_m_a_n_d.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       Default.

SSTTDDOOUUTT
       See the utility description for the specified _c_o_m_m_a_n_d.

SSTTDDEERRRR
       See the utility description for the specified _c_o_m_m_a_n_d.

OOUUTTPPUUTT FFIILLEESS
       See the utility description for the specified _c_o_m_m_a_n_d.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
       The following pseudo-utilities shall be supported as _c_o_m_m_a_n_d operands.
       All options referred to in the following list are values given in the
       _o_p_t_i_o_n_s operands following _c_o_m_m_a_n_d.

       cchheecckk   Equivalent to iinnffoo, except that nothing shall be printed if
               nothing is being edited, and a non-zero exit status shall be
               returned if anything is being edited. The intent is to have
               this included in an ``install'' entry in a makefile to ensure
               that everything is included into the SCCS file before a version
               is installed.

       cclleeaann   Remove everything from the current directory that can be
               recreated from SCCS files, but do not remove any files being
               edited. If the --bb option is given, branches shall be ignored in
               the determination of whether they are being edited; this is
               dangerous if branches are kept in the same directory.

       ccrreeaattee  Create an SCCS file, taking the initial contents from the file
               of the same name. Any options to _a_d_m_i_n are accepted. If the
               creation is successful, the original files shall be renamed by
               prefixing the basenames with a comma. These renamed files
               should be removed after it has been verified that the SCCS
               files have been created successfully.

       ddeellggeett  Perform a _d_e_l_t_a on the named files and then _g_e_t new versions.
               The new versions shall have ID keywords expanded and shall not
               be editable. Any --mm, --pp, --rr, --ss, and --yy options shall be passed
               to _d_e_l_t_a, and any --bb, --cc, --ee, --ii, --kk, --ll, --ss, and --xx options
               shall be passed to _g_e_t.

       ddeelleeddiitt Equivalent to ddeellggeett, except that the _g_e_t phase shall include
               the --ee option. This option is useful for making a checkpoint of
               the current editing phase. The same options shall be passed to
               _d_e_l_t_a as described above, and all the options listed for _g_e_t
               above except --ee shall be passed to eeddiitt.

       ddiiffffss   Write a difference listing between the current version of the
               files checked out for editing and the versions in SCCS format.
               Any --rr, --cc, --ii, --xx, and --tt options shall be passed to _g_e_t; any
               --ll, --ss, --ee, --ff, --hh, and --bb options shall be passed to _d_i_f_f.  A
               --CC option shall be passed to _d_i_f_f as --cc.

       eeddiitt    Equivalent to _g_e_t --ee.

       ffiixx     Remove the named delta, but leave a copy of the delta with the
               changes that were in it. It is useful for fixing small compiler
               bugs, and so on. The application shall ensure that it is
               followed by a --rr _S_I_D option. Since ffiixx does not leave audit
               trails, it should be used carefully.

       iinnffoo    Write a listing of all files being edited. If the --bb option is
               given, branches (that is, SIDs with two or fewer components)
               shall be ignored. If a --uu _u_s_e_r option is given, then only files
               being edited by the named user shall be listed. A --UU option
               shall be equivalent to --uu<_c_u_r_r_e_n_t _u_s_e_r>.

       pprriinntt   Write out verbose information about the named files, equivalent
               to _s_c_c_s _p_r_s.

       tteellll    Write a <newline>-separated list of the files being edited to
               standard output. Takes the --bb, --uu, and --UU options like iinnffoo and
               cchheecckk.

       uunneeddiitt  This is the opposite of an eeddiitt or a _g_e_t --ee.  It should be used
               with caution, since any changes made since the _g_e_t are lost.

EEXXIITT SSTTAATTUUSS
       The following exit values shall be returned:

        0    Successful completion.

       >0    An error occurred.

CCOONNSSEEQQUUEENNCCEESS OOFF EERRRROORRSS
       Default.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       Many of the SCCS utilities take directory names as operands as well as
       specific filenames. The pseudo-utilities supported by _s_c_c_s are not
       described as having this capability, but are not prohibited from doing
       so.

EEXXAAMMPPLLEESS
        1. To get a file for editing, edit it and produce a new delta:


               sccs get -e file.c
               ex file.c
               sccs delta file.c

        2. To get a file from another directory:


               sccs -p /usr/src/sccs/s. get cc.c

           or:


               sccs get /usr/src/sccs/s.cc.c

        3. To make a delta of a large number of files in the current
           directory:


               sccs delta *.c

        4. To get a list of files being edited that are not on branches:


               sccs info -b

        5. To delta everything being edited by the current user:


               sccs delta $(sccs tell -U)

        6. In a makefile, to get source files from an SCCS file if it does not
           already exist:


               SRCS = <_l_i_s_t _o_f _s_o_u_r_c_e _f_i_l_e_s>
               $(SRCS):
                   sccs get $(REL) $@

RRAATTIIOONNAALLEE
       _s_c_c_s and its associated utilities are part of the XSI Development
       Utilities option within the XSI option.

       SCCS is an abbreviation for Source Code Control System. It is a
       maintenance and enhancement tracking tool. When a file is put under
       SCCS, the source code control system maintains the file and, when
       changes are made, identifies and stores them in the file with the
       original source code and/or documentation. As other changes are made,
       they too are identified and retained in the file.

       Retrieval of the original and any set of changes is possible. Any
       version of the file as it develops can be reconstructed for inspection
       or additional modification. History data can be stored with each
       version, documenting why the changes were made, who made them, and when
       they were made.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _a_d_m_i_n, _d_e_l_t_a, _g_e_t, _m_a_k_e, _p_r_s, _r_m_d_e_l, _s_a_c_t, _u_n_g_e_t, _v_a_l, _w_h_a_t

       The Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t
       _V_a_r_i_a_b_l_e_s, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s

CCOOPPYYRRIIGGHHTT
       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.  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 .



IEEE/The Open Group                  2017                              SCCS(1)
