You can create, edit, and update an SCCS file using the admin, get, and delta commands.
|admin||Creates an SCCS file or changes an existing SCCS file.|
admin -n s.test.c
Using the admin command with the -n flag creates an empty SCCS file.
admin -itest.c s.test.c There are no SCCS identification keywords in the file (cm7) ls s.test.c test.c
If you use the -i flag, the admin command creates delta 1.1 from the specified file. Once delta 1.1 is created, rename the original text file so it does not interfere with SCCS commands (it will act as a backup):
mv test.c back.c
The message There are no SCCS identification keywords in the file (cm7) does not indicate an error.
admin -itest.c -r3 s.test.c
Attention: Do not edit SCCS files directly with non-SCCS commands, or you can damage the SCCS files.
|get||Gets a specified version of an SCCS file for editing or compiling.|
get -e s.test.c 1.3 new delta 1.4 67 lines ls p.test.c s.test.c test.c
The get command produces two new files, p.test.c and test.c. The editable file is test.c. The p.test.c file is a temporary, uneditable file used by SCCS to keep track of file versions. It will disappear when you update your changes to the SCCS file. Notice also that the get command prints the SID of the version built for editing, the SID assigned to the new delta when you update your changes, and the number of lines in the file.
You can now work on your actual file. Edit this file as often as you wish. Your changes will not affect the SCCS file until you choose to update it.
get -r1.3 s.test.c 1.3 67 lines get -r184.108.40.206 s.test.c 220.127.116.11 50 lines
|delta||Adds a set of changes (deltas) to the text of an SCCS file.|
$delta s.test.c Type comments, terminated with EOF or a blank line:
No id keywords (cm7) 1.2 5 lines inserted 6 lines deleted 12 lines unchanged
The delta command updates the s.prog.c file with the changes you made to the test.c file. The delta command tells you that the SID of the new version is 1.2, and that the edited file inserted 5 lines, deleted 6 lines, and left 12 lines unchanged from the previous version.
sccsfile file format
admin command, delta command, and get command