What I know is, 开发者_Python百科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?
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
withrmelem
, 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 thelost+found
directory.
While the content oflost+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 runrmelem
recursively inlost+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 usingmv
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).
精彩评论