Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
438 views
in Technique[技术] by (71.8m points)

clearcase - Whats the easiest way to completely remove a directory element & all its sub-contents from VOB?

What I know is, using rmelem to remove the folder first, and this will cause all of its child elements to be moved to lost+found.

Then, go into lost+found, and repeatedly execute rmelem * until all of the elements are removed.

Is there a better way?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The technote about lost+found is quite clear:

if you rmelem a directory, all its content will indeed be moved to lost+found, where it will has to lost+found. The technote adds:

Note: If a directory element is deleted from lost+found with rmelem, its contents will be moved to lost+found in the same manner described in the first section above.

That is why I always try to rmelem files first, then directories, in order to avoid a trip (or several trips) in lost+found.

Except I very rarely rmelem anything, as the same technote warns:

Use rmelem carefully when deleting elements or symbolic links from the lost+found directory.
While the content of lost+found typically consists of unwanted elements and symbolic links, in some circumstances it can contain elements that are cataloged elsewhere in the VOB (that is, not orphaned) that are associated by symbolic or hard links.
For this reason, do not run rmelem recursively in lost+found without first verifying it contents.

If you need to save an element that is currently in lost+found, catalog it in a versioned directory using mv as explained in the previous section

Actually, with ClearCase UCM, it is almost impossible to rmelem any element with some history, because of all the hyperlink you would compromised (related to baselines mainly).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...