SCCS Chapter 5
时间:2005-05-17 来源:solaris10_x86
Detecting and Repairing Damaged SCCS Files
Detecting and Repairing Damaged SCCS Files
You can detect and repair damaged SCCS files using the admin command.
Procedure
- Check SCCS files on a regular basis for possible damage. Any time an SCCS file is changed without properly using SCCS commands, damage may result to the file. The SCCS file system detects this damage by calculating the checksum and comparing it with the one stored in the delta table. Check for damage by running the admin command with the -h flag on all SCCS files or SCCS directories as shown:
admin -h s.file1 s.file2 ...
OR
admin -h directory1 directory2 ...
If the admin command finds a file where the computed checksum is not equal to the checksum listed in the SCCS file header, it displays this message:
ERROR [s.filename]: 1255-057 The file is damaged. (co6)
- If a file was damaged, try to edit the file again or read a backup copy. Once the checksum has been recalculated, any remaining damage will be undetectable by the admin command. Note: Using the admin command with the -z flag on a damaged file can prevent future detection of the damage.
- After fixing the file, run the admin command with the -z flag and the repaired file name:
admin -z s.file1
相关阅读 更多 +