You can create, edit, and update an SCCS file using the admin, get, and delta commands.
admin -n s.test.cUsing 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) li s.test.c test.cIf 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.cThe 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 -e s.test.c 1.3 new delta 1.4 67 lines li p.test.c s.test.c test.cThe 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.
ed test.cYou 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 -r1.3.1.4 s.test.c 1.3.1.4 50 lines
$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 unchangedThe 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.
The sccsfile file format.
The admin command, delta command, and get command.