1sccs(1) User Commands sccs(1)
2
3
4
6 sccs - front end for the Source Code Control System (SCCS)
7
9 /usr/bin/sccs [-r] [-drootprefix] [-psubdir] subcommand
10 [option]... [file]...
11
12
13 /usr/xpg4/bin/sccs [-r] [-d rootprefix] [-p subdir] subcommand
14 [option]... [file]...
15
16
18 The sccs command is a comprehensive, straightforward front end to the
19 various utility programs of the Source Code Control System (SCCS).
20
21
22 sccs applies the indicated subcommand to the history file associated
23 with each of the indicated files.
24
25
26 The name of an SCCS history file is derived by prepending the `s.' pre‐
27 fix to the filename of a working copy. The sccs command normally
28 expects these `s.files' to reside in an SCCS subdirectory. Thus, when
29 you supply sccs with a file argument, it normally applies the subcom‐
30 mand to a file named s.file in the SCCS subdirectory. If file is a path
31 name, sccs looks for the history file in the SCCS subdirectory of that
32 file's parent directory. If file is a directory, however, sccs applies
33 the subcommand to every s.file file it contains. Thus, the command:
34
35 example% sccs get program.c
36
37
38
39
40 would apply the get subcommand to a history file named SCCS/s.pro‐
41 gram.c, while the command:
42
43 example% sccs get SCCS
44
45
46
47
48 would apply it to every s.file in the SCCS subdirectory.
49
50
51 Options for the sccs command itself must appear before the subcommand
52 argument. Options for a given subcommand must appear after the subcom‐
53 mand argument. These options are specific to each subcommand, and are
54 described along with the subcommands themselves (see Subcommands
55 below).
56
57 Running Setuid
58 The sccs command also includes the capability to run ``setuid'' to pro‐
59 vide additional protection. However, this does not apply to subcom‐
60 mands such as sccs-admin(1), since this would allow anyone to change
61 the authorizations of the history file. Commands that would do so
62 always run as the real user.
63
65 The following options are supported:
66
67 /usr/bin/sccs
68 -drootprefix
69
70 /usr/xpg4/bin/sccs
71 -d rootprefix
72
73 Defines the root portion of the path name for SCCS history files.
74 The default root portion is the current directory. rootprefix is
75 prepended to the entire file argument, even if file is an absolute
76 path name. -d overrides any directory specified by the PROJECTDIR
77 environment variable (see ENVIRONMENT VARIABLES below).
78
79
80 /usr/bin/sccs
81 -psubdir
82
83 /usr/xpg4/bin/sccs
84 -psubdir
85
86 Defines the (sub)directory within which a history file is expected
87 to reside. SCCS is the default. (See EXAMPLES below).
88
89
90 -r
91
92 Runs sccs with the real user ID, rather than set to the effective
93 user ID.
94
95
97 The following operands are supported:
98
99 file
100
101 a file passed to subcommand
102
103
104 option
105
106 an option or option-argument passed to subcommand
107
108
109 subcommand
110
111 one of the subcommands listed in Usage
112
113
115 The usage for sccs is described below.
116
117 Subcommands
118 Many of the following sccs subcommands invoke programs that reside in
119 /usr/bin. Many of these subcommands accept additional arguments that
120 are documented in the reference page for the utility program the sub‐
121 command invokes.
122
123 admin
124
125 Modify the flags or checksum of an SCCS history file. Refer to
126 sccs-admin(1) for more information about the admin utility. While
127 admin can be used to initialize a history file, you might find that
128 the create subcommand is simpler to use for this purpose.
129
130
131 /usr/bin/sccs
132 cdc -rsid [ -y[comment]]
133
134 /usr/xpg4/bin/sccs
135 cdc -rsid | -rsid [ -y[comment]]
136
137 Annotate (change) the delta commentary. Refer to sccs-cdc(1). The
138 fix subcommand can be used to replace the delta, rather than merely
139 annotating the existing commentary.
140
141 -r sid | -rsid
142
143 Specify the SCCS delta ID (SID) to which the change notation is
144 to be added. The SID for a given delta is a number, in Dewey
145 decimal format, composed of two or four fields: the release and
146 level fields, and for branch deltas, the branch and sequence
147 fields. For instance, the SID for the initial delta is nor‐
148 mally 1.1.
149
150
151 -y"[comment]"
152
153 Specify the comment with which to annotate the delta commen‐
154 tary. If -y is omitted, sccs prompts for a comment. A null com‐
155 ment results in an empty annotation.
156
157
158
159 /usr/bin/sccs
160 check [-b] [-u[username] ]
161
162 /usr/xpg4/bin/sccs
163 check [-b] [-u [username] | -U ]
164
165 Check for files currently being edited. Like info and tell, but
166 returns an exit code, rather than producing a listing of files.
167 check returns a non-zero exit status if anything is being edited.
168
169 -b
170
171 Ignore branches.
172
173
174 -u[username] | -u [ username] | -U
175
176 Check only files being edited by you. When username is speci‐
177 fied, check only files being edited by that user. For
178 /usr/xpg4/bin/sccs, the -U option is equivalent to -u <cur‐
179 rent_user>.
180
181
182
183 clean [ -b ]
184
185 Remove everything in the current directory that can be retrieved
186 from an SCCS history. Does not remove files that are being edited.
187
188 -b Do not check branches to see if they are being edited. `clean
189 -b' is dangerous when branch versions are kept in the same
190 directory.
191
192
193
194 comb
195
196 Generate scripts to combine deltas. Refer to sccs-comb(1).
197
198
199 create
200
201 Create (initialize) history files. create performs the following
202 steps:
203
204 o Renames the original source file to ,program.c in the
205 current directory.
206
207 o Create the history file called s.program.c in the SCCS
208 subdirectory.
209
210 o Performs an `sccs get' on program.c to retrieve a read-
211 only copy of the initial version.
212
213
214 deledit [-s] [-y[comment]]
215
216 Equivalent to an `sccs delta' and then an `sccs edit'. deledit
217 checks in a delta, and checks the file back out again, but leaves
218 the current working copy of the file intact.
219
220 -s Silent. Do not report delta numbers or statistics.
221
222
223 -y[comment] Supply a comment for the delta commentary. If -y is
224 omitted, delta prompts for a comment. A null com‐
225 ment results in an empty comment field for the
226 delta.
227
228
229
230 delget [-s] [-y[comment]]
231
232 Perform an `sccs delta' and then an `sccs get' to check in a delta
233 and retrieve read-only copies of the resulting new version. See the
234 deledit subcommand for a description of -s and -y. sccs performs a
235 delta on all the files specified in the argument list, and then a
236 get on all the files. If an error occurs during the delta, the get
237 is not performed.
238
239
240 delta [-s] [-y[comment]]
241
242 Check in pending changes. Records the line-by-line changes intro‐
243 duced while the file was checked out. The effective user ID must be
244 the same as the ID of the person who has the file checked out.
245 Refer to sccs-delta(1). See the deledit subcommand for a descrip‐
246 tion of -s and -y.
247
248
249 /usr/bin/sccs
250 diffs [-C] [-I] [-cdate-time] [-rsid] diff-options
251
252 /usr/xpg4/bin/sccs
253 diffs [-C] [-I] [-c date-time | -cdate-time ]
254 [-r sid | -rsid] diff-options
255
256 Compare (in diff(1) format) the working copy of a file that is
257 checked out for editing, with a version from the SCCS history. Use
258 the most recent checked-in version by default. The diffs subcommand
259 accepts the same options as diff.
260
261 Any -r, -c, -i, -x, and -t options are passed to subcommand get. A
262 -C option is passed to diff as -c. An -I option is passed to diff
263 as -i.
264
265 -c date-time | -cdate-time
266
267 Use the most recent version checked in before the indicated
268 date and time for comparison. date-time takes the form:
269 yy[mm[dd[ hh[mm[ss]]]]]. Omitted units default to their maximum
270 possible values; that is -c7502 is equivalent to
271 -c750228235959.
272
273
274 -r sid | -rsid
275
276 Use the version corresponding to the indicated delta for com‐
277 parison.
278
279
280
281 edit
282
283 Retrieve a version of the file for editing. `sccs edit' extracts a
284 version of the file that is writable by you, and creates a p.file
285 in the SCCS subdirectory as lock on the history, so that no one
286 else can check that version in or out. ID keywords are retrieved in
287 unexpanded form. edit accepts the same options as get, below. Refer
288 to sccs-get(1) for a list of ID keywords and their definitions.
289
290
291 enter
292
293 Similar to create, but omits the final `sccs get'. This can be used
294 if an `sccs edit' is to be performed immediately after the history
295 file is initialized.
296
297
298 /usr/bin/sccs
299 fix -rsid
300
301 /usr/xpg4/bin/sccs
302 fix -r sid | -rsid
303
304 Revise a (leaf) delta. Remove the indicated delta from the SCCS
305 history, but leave a working copy of the current version in the
306 directory. This is useful for incorporating trivial updates for
307 which no audit record is needed, or for revising the delta commen‐
308 tary. fix must be followed by a -r option, to specify the SID of
309 the delta to remove. The indicated delta must be the most recent
310 (leaf) delta in its branch. Use fix with caution since it does not
311 leave an audit trail of differences (although the previous commen‐
312 tary is retained within the history file).
313
314
315 /usr/bin/sccs
316 get [-ekmps] [-Gnewname] [-cdate-time] [-r[sid] ]
317
318 /usr/xpg4/bin/sccs
319 get [-ekmps] [-G newname | -Gnewname]
320 [-c date-time | -cdate-time] [-r sid | -rsid]
321
322 Retrieve a version from the SCCS history. By default, this is a
323 read-only working copy of the most recent version. ID keywords are
324 in expanded form. Refer to sccs-get(1), which includes a list of ID
325 keywords and their definitions.
326
327 -c date-time | -cdate-time
328
329 Retrieve the latest version checked in prior to the date and
330 time indicated by the date-time argument. date-time takes the
331 form: yy[mm[dd[ hh[mm[ss]]]]].
332
333
334 -e
335
336 Retrieve a version for editing. Same as sccs edit.
337
338
339 -G newname | -Gnewname
340
341 Use newname as the name of the retrieved version.
342
343
344 -k
345
346 Retrieve a writable copy but do not check out the file. ID key‐
347 words are unexpanded.
348
349
350 -m
351
352 Precede each line with the SID of the delta in which it was
353 added.
354
355
356 -p
357
358 Produce the retrieved version on the standard output. Reports
359 that would normally go to the standard output (delta IDs and
360 statistics) are directed to the standard error.
361
362
363 -r sid | -rsid
364
365 Retrieve the version corresponding to the indicated SID. For
366 /usr/bin/sccs, if no sid is specified, the latest sid for the
367 specified file is retrieved.
368
369
370 -s
371
372 Silent. Do not report version numbers or statistics.
373
374
375
376 help message-code|sccs-command
377 help stuck
378
379 Supply more information about SCCS diagnostics. help displays a
380 brief explanation of the error when you supply the code displayed
381 by an SCCS diagnostic message. If you supply the name of an SCCS
382 command, it prints a usage line. help also recognizes the keyword
383 stuck. Refer to sccs-help(1).
384
385
386 /usr/bin/sccs
387 info [-b] [-u[username] ]
388
389 /usr/xpg4/bin/sccs
390 info [-b] [-u [ username] | -U]
391
392 Display a list of files being edited, including the version number
393 checked out, the version to be checked in, the name of the user who
394 holds the lock, and the date and time the file was checked out.
395
396 -b
397
398 Ignore branches.
399
400
401 -u[username] | -u [username] | -U
402
403 List only files checked out by you. When username is specified,
404 list only files checked out by that user. For
405 /usr/xpg4/bin/sccs, the -U option is equivalent to -u <cur‐
406 rent_user>.
407
408
409
410 print
411
412 Print the entire history of each named file. Equivalent to an `sccs
413 prs -e' followed by an `sccs get -p -m'.
414
415
416 /usr/bin/sccs
417 prs [-el] [-cdate-time] [-rsid]
418
419 /usr/xpg4/bin/sccs
420 prs [-el] [ -c date-time | -cdate-time] [-r sid | -rsid]
421
422 Peruse (display) the delta table, or other portion of an s. file.
423 Refer to sccs-prs(1).
424
425 -c date-time | -cdate-time
426
427 Specify the latest delta checked in before the indicated date
428 and time. The date-time argument takes the orm: yy[mm[dd[
429 hh[mm[ss]]]]].
430
431
432 -e
433
434 Display delta table information for all deltas earlier than the
435 one specified with -r (or all deltas if none is specified).
436
437
438 -l
439
440 Display information for all deltas later than, and including,
441 that specified by -c or -r.
442
443
444 -r sid | -rsid
445
446 Specify a given delta by SID.
447
448
449
450 prt [-y] Display the delta table, but omit the MR field (see sccs‐
451 file(4) for more information on this field). Refer to sccs-
452 prt(1).
453
454 -y Display the most recent delta table entry. The for‐
455 mat is a single output line for each file argument,
456 which is convenient for use in a pipeline with awk(1)
457 or sed(1).
458
459
460
461 /usr/bin/sccs
462 rmdel -rsid
463
464 /usr/xpg4/bin/sccs
465 rmdel -r sid
466
467 Remove the indicated delta from the history file. That delta must
468 be the most recent (leaf) delta in its branch. Refer to sccs-
469 rmdel(1).
470
471
472 sact
473
474 Show editing activity status of an SCCS file. Refer to sccs-
475 sact(1).
476
477
478 sccsdiff -rold-sid -rnew-sid diff-options
479
480 Compare two versions corresponding to the indicated SIDs (deltas)
481 using diff. Refer to sccs-sccsdiff(1).
482
483
484 /usr/bin/sccs
485 tell [-b] [-u[username] ]
486
487 /usr/xpg4/bin/sccs
488 tell [-b] [-u [username] | -U]
489
490 Display the list of files that are currently checked out, one file
491 per line.
492
493 -b
494
495 Ignore branches.
496
497
498 -u[username] | -u [username] | -U
499
500 List only files checked out to you. When username is speci‐
501 fied, list only files checked out to that user. For
502 /usr/xpg4/bin/sccs, the -U option is equivalent to -u <cur‐
503 rent_user>.
504
505
506
507 unedit
508
509 "Undo" the last edit or `get -e', and return the working copy to
510 its previous condition. unedit backs out all pending changes made
511 since the file was checked out.
512
513
514 unget
515
516 Same as unedit. Refer to sccs-unget(1).
517
518
519 val
520
521 Validate the history file. Refer to sccs-val(1).
522
523
524 what
525
526 Display any expanded ID keyword strings contained in a binary
527 (object) or text file. Refer to what(1) for more information.
528
529
531 Example 1 Checking out, editing, and checking in a file
532
533
534 To check out a copy of program.c for editing, edit it, and then check
535 it back in:
536
537
538 example% sccs edit program.c
539 1.1
540 new delta 1.2
541 14 lines
542
543 example% vi program.c
544 your editing session
545
546 example% sccs delget program.c
547 comments? clarified cryptic diagnostic
548 1.2
549 3 inserted
550 2 deleted
551 12 unchanged
552 1.2
553 15 lines
554
555
556
557 Example 2 Defining the root portion of the command pathname
558
559
560 sccs converts the command:
561
562
563 example% sccs -d/usr/src/include get stdio.h
564
565
566
567
568 to:
569
570
571 /usr/bin/get /usr/src/include/SCCS/s.stdio.h
572
573
574
575 Example 3 Defining the resident subdirectory
576
577
578 The command:
579
580
581 example% sccs -pprivate get include/stdio.h
582
583
584
585
586 becomes:
587
588
589 /usr/bin/get include/private/s.stdio.h
590
591
592
593 Example 4 Initializing a history file
594
595
596 To initialize the history file for a source file named program.c, make
597 the SCCS subdirectory, and then use `sccs create':
598
599
600 example% mkdir SCCS
601 example% sccs create program.c
602 program.c:
603 1.1
604 14 lines
605
606
607
608
609 After verifying the working copy, you can remove the backup file that
610 starts with a comma:
611
612
613 example% diff program.c ,program.c
614 example% rm ,program.c
615
616
617
618 Example 5 Retrieving a file from another directory
619
620
621 To retrieve a file from another directory into the current directory:
622
623
624 example% sccs get /usr/src/sccs/cc.c
625
626
627
628
629 or:
630
631
632 example% sccs -p/usr/src/sccs/ get cc.c
633
634
635
636 Example 6 Checking out all files
637
638
639 To check out all files under SCCS in the current directory:
640
641
642 example% sccs edit SCCS
643
644
645
646 Example 7 Checking in all files
647
648
649 To check in all files currently checked out to you:
650
651
652 example% sccs delta `sccs tell -u`
653
654
655
656 Example 8 Entering multiple lines of comments
657
658
659 If using -y to enter a comment, for most shells, enclose the comment in
660 single or double quotes. In the following example, Myfile is checked in
661 with a two-line comment:
662
663
664 example% sccs deledit Myfile -y"Entering a
665 multi-line comment"
666 No id keywords (cm7)
667 1.2
668 2 inserted
669 0 deleted
670 14 unchanged
671 1.2
672 new delta 1.3
673
674
675
676
677 Displaying the SCCS history of Myfile:
678
679
680 example% sccs prt Myfile
681
682 SCCS/s.Myfile:
683
684 D 1.2 01/04/20 16:37:07 me 2 1 00002/00000/00014
685 Entering a
686 multi-line comment
687
688 D 1.1 01/04/15 13:23:32 me 1 0 00014/00000/00000
689 date and time created 01/04/15 13:23:32 by me
690
691
692
693
694 If -y is not used and sccs prompts for a comment, the newlines must be
695 escaped using the backslash character (\):
696
697
698 example% sccs deledit Myfile
699 comments? Entering a \
700 multi-line comment
701 No id keywords (cm7)
702 1.2
703 0 inserted
704 0 deleted
705 14 unchanged
706 1.2
707 new delta 1.3
708
709
710
712 See environ(5) for descriptions of the following environment variables
713 that affect the execution of sccs: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES,
714 and NLSPATH.
715
716 PROJECTDIR If contains an absolute path name (beginning with a
717 slash), sccs searches for SCCS history files in the
718 directory given by that variable.
719
720 If PROJECTDIR does not begin with a slash, it is taken as
721 the name of a user, and sccs searches the src or source
722 subdirectory of that user's home directory for history
723 files. If such a directory is found, it is used. Other‐
724 wise, the value is used as a relative path name.
725
726
728 The following exit values are returned:
729
730 0 Successful completion.
731
732
733 >0 An error occurred.
734
735
737 SCCS SCCS subdirectory
738
739
740 SCCS/d.file temporary file of differences
741
742
743 SCCS/p.file lock (permissions) file for checked-out versions
744
745
746 SCCS/q.file temporary file
747
748
749 SCCS/s.file SCCS history file
750
751
752 SCCS/x.file temporary copy of the s.file
753
754
755 SCCS/z.file temporary lock file
756
757
758 /usr/bin/* SCCS utility programs
759
760
762 See attributes(5) for descriptions of the following attributes:
763
764 /usr/bin/sccs
765 ┌─────────────────────────────┬─────────────────────────────┐
766 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
767 ├─────────────────────────────┼─────────────────────────────┤
768 │Availability │SUNWsprot │
769 └─────────────────────────────┴─────────────────────────────┘
770
771 /usr/xpg4/bin/sccs
772 ┌─────────────────────────────┬─────────────────────────────┐
773 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
774 ├─────────────────────────────┼─────────────────────────────┤
775 │Availability │SUNWxcu4t │
776 ├─────────────────────────────┼─────────────────────────────┤
777 │Interface Stability │Standard │
778 └─────────────────────────────┴─────────────────────────────┘
779
781 awk(1), diff(1), sccs-admin(1), sccs-cdc(1), sccs-comb(1), sccs-
782 delta(1), sccs-get(1), sccs-help(1), sccs-prs(1), sccs-rmdel(1), sccs-
783 sact(1), sccs-sccsdiff(1), sccs-unget(1), sccs-val(1), sed(1), what(1),
784 sccsfile(4), attributes(5), environ(5), standards(5)
785
786
787
788SunOS 5.11 30 Jun 2007 sccs(1)