Topic
  • 2 replies
  • Latest Post - ‏2013-08-26T14:48:56Z by JirongHu
JirongHu
JirongHu
681 Posts

Pinned topic Circular issue in rmelem empty directories in lost+found

‏2013-08-20T21:12:34Z |

It creates a new file after deleting an empty directory. If I delete the new file, a bunch will be created. What shall I do now?

 

M:\ccadm01_JAWC_Main\Java_AVOB\lost+found>dir
 Volume in drive M is CCase
 Volume Serial Number is 0234-5789
 
 Directory of M:\ccadm01_JAWC_Main\Java_AVOB\lost+found
 
08/20/2013  05:04 PM    <DIR>          .
06/02/2013  10:48 AM    <DIR>          ..
08/07/2013  01:26 AM    <DIR>          lobtools.a94a5a2aa73f400db0db96d0b6f0c1ba
08/07/2013  01:27 AM    <DIR>          lobtools.cac03b254d054bd197f495ad6d9b5244
08/07/2013  01:28 AM    <DIR>          lobtools.eb4600758d0f48dc8a38cda9a26349f9
08/07/2013  01:30 AM    <DIR>          lobtools.ede60c68065c409190788c613c3cf552
08/07/2013  01:32 AM    <DIR>          lobtools.c36392104bb145ac8d96cae0dea0bfc3
08/20/2013  08:59 AM            44,022 evil-twin.txt
08/20/2013  10:39 AM            44,022 evil-twin_Main.txt
08/20/2013  05:04 PM             2,882 lf.bat
               3 File(s)         90,926 bytes
               7 Dir(s)  52,428,800,000 bytes free
 
M:\ccadm01_JAWC_Main\Java_AVOB\lost+found>cleartool rmelem lobtools.a94a5a2aa73f400db0db96d0b6f0c1ba
CAUTION! This will destroy the element, all its branches and versions,
including all data, meta-data and history, and will remove the element
from all directory versions that now contain it.  Once you destroy the
element, there will be no way to restore it to its current state.
If you want to preserve the element, but remove references to it from
future directory versions, use the "rmname" command.
 
Element "lobtools.a94a5a2aa73f400db0db96d0b6f0c1ba" has 2 branches, 4 versions, and is entered
in 1 directory versions.
Destroy element?  [no] y
cleartool: Warning: Object "properties" no longer referenced.
cleartool: Warning: Moving object to vob lost+found directory as "properties.d9dd82d62f61434b8d8945dc9ad0dc68".
Removed element "lobtools.a94a5a2aa73f400db0db96d0b6f0c1ba".
 
M:\ccadm01_JAWC_Main\Java_AVOB\lost+found>
  • Dave-Robinson
    Dave-Robinson
    116 Posts

    Re: Circular issue in rmelem empty directories in lost+found

    ‏2013-08-26T01:29:22Z  

    Hello JirongHu,

     

    Your headline says "Circular issue in rmelem empty directories in lost+found"

    In fact these directories are not REALLY empty !

    lost+found is a special directory element with only one version (/main/0), so you see its content in any view.

    When it contain subdirectories, those subdirectories are directory elements with proper version trees, so if you cd into one of them, or "dir" it, you will be checking the content of one specific version, which may well be empty, but it does not mean that all versions of that directory element are empty.

    We normally recommend you remove things from lost+found by the following command (assuming you are sure you don't want to "rescue" files that are there!!! - move them instead of remove them):

    cleartool find <lost+found>\* -depth -exec "cleartool rmelem -f \"%CLEARCASE_PN%\" "

    the "-depth" makes it remove the content of subirectories before removing the subdirectories themselves

    but this also assumes you have a config spec set that will make any subdirectories visible.

    Hence I would recommend first doing an lsvtree of the directories you see in lost+found, then modify your config spec to something that seems likely to maximize the visible directories, then use the "cleartool find"

    David

  • JirongHu
    JirongHu
    681 Posts

    Re: Circular issue in rmelem empty directories in lost+found

    ‏2013-08-26T14:48:56Z  

    Hello JirongHu,

     

    Your headline says "Circular issue in rmelem empty directories in lost+found"

    In fact these directories are not REALLY empty !

    lost+found is a special directory element with only one version (/main/0), so you see its content in any view.

    When it contain subdirectories, those subdirectories are directory elements with proper version trees, so if you cd into one of them, or "dir" it, you will be checking the content of one specific version, which may well be empty, but it does not mean that all versions of that directory element are empty.

    We normally recommend you remove things from lost+found by the following command (assuming you are sure you don't want to "rescue" files that are there!!! - move them instead of remove them):

    cleartool find <lost+found>\* -depth -exec "cleartool rmelem -f \"%CLEARCASE_PN%\" "

    the "-depth" makes it remove the content of subirectories before removing the subdirectories themselves

    but this also assumes you have a config spec set that will make any subdirectories visible.

    Hence I would recommend first doing an lsvtree of the directories you see in lost+found, then modify your config spec to something that seems likely to maximize the visible directories, then use the "cleartool find"

    David

    Hi David

    Thank you very much for the information. Later I realized when I said circular that was not right. It's just many files with similar names. When I deleted an "empty" directory, many files appeared in lost+found as you said. I just need to keep on deleting these files. Your approach is better.

    Jirong