以下是由IBM提供清理lost+found directory的方法,由於都是英文,所以需要傷腦筋一下
After you cd into lost+found directory, you can use the following command to print out all elements in lost+found
cleartool find . -print
To remove all elements from lost+found recursively, you can replace -print with -exec
cleartool find . -exec “cleartool rmelem -force %CLEARCASE_PN%”
If you have elements with spaces in their path name, you need to put “ around %CLEARCASE_PN%
cleartool find . -exec “cleartool rmelem -force \”%CLEARCASE_PN%\””
If you put those commands in a batch file, you need to double the % sign
For example,
cleartool find . -exec “cleartool rmelem -force %%CLEARCASE_PN%%”
cleartool find . -exec “cleartool rmelem -force \”%%CLEARCASE_PN%%\””
We were talking about deleting file elements before deleting directory elements,
cleartool find . -type f -exec “cleartool rmelem -force %CLEARCASE_PN%”
cleartool find . -type d -exec “cleartool rmelem -force %CLEARCASE_PN%”
We also talked about running the following command multiple times to totally clean out lost+found
cleartool find . -exec “cleartool rmelem -force %CLEARCASE_PN%”
Please make sure you run the above command after you cd into lost+found directory.
Please note that if you run the above command at the root directory of your VOB, all elements will be deleted and the only way to get them back will be restoring from backup.