LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   "WARNING: Circular directory structure" error when deleting directory (http://www.linuxquestions.org/questions/linux-software-2/warning-circular-directory-structure-error-when-deleting-directory-285450/)

pistonbrew 02-02-2005 02:58 PM

"WARNING: Circular directory structure" error when deleting directory
 
Hi

I'm trying to delete a folder (a Superkaramba theme) from my 512mb USB memory stick, but I get this scary looking error:

[root@localhost removable]# rm -rf TubeClock/
rm: WARNING: Circular directory structure.
This almost certainly means that you have a corrupted file system.
NOTIFY YOUR SYSTEM MANAGER.
The following directory is part of the cycle:
`TubeClock//TubeClock'

[root@localhost removable]#


I'm on Mandrake 10.1, and haven't had any other problems with the USB stick so far. Is there some way I can format it? I'm a relative noob to Linux.


Cheers

Bob

cadkins 02-02-2005 04:02 PM

well, it doesn't sound good does it?

Have a look here : https://lists.dulug.duke.edu/piperma...er/015939.html

seems like someone else was having that problem.

pistonbrew 02-03-2005 03:02 AM

ah, thanks for the tip, i'll try it later and post the result here.

weird though, i have no idea why it's happened- all i did was copy a superkaramba theme onto the USB stick from my home system, and took it to work to install there. each time you descend into the /Tubeclock directory, there's another /Tubeclock directory, and so on, probably forever... but if i inspect the file on my home system then it looks perfectly normal.

cheers for the link anyway!

bob

Quote:

Originally posted by cadkins
well, it doesn't sound good does it?

Have a look here : https://lists.dulug.duke.edu/piperma...er/015939.html

seems like someone else was having that problem.


KimVette 02-03-2005 05:57 AM

if you go to /Tubeclock and do an 'ls -l' what do you see? Do you see something resembling:

[code]

user@foo:/Tubeclock>Tubeclock -> ../Tubeclock

[code]

or anything remotely similar? Usually when you have an error regarding a circular file reference you have a file linked to "." or something equally dopey. If you try to traverse it in a shell prompt it won't do much of anything but graphical file managers are often too stupid to trap such conditions - garbage in | garbage out applies in those cases. You need to find where that link is and remove it. This is of course if I have a correct understanding of the symptom.

pistonbrew 02-03-2005 05:59 AM

well i tried to follow the suggestions in that link, but couldn't format the USB stick. it would umount OK but wouldn't format:

[root@www bob]# umount /mnt/removable/
[root@www bob]# mkfs.vfat /mnt/removable/
mkfs.vfat 2.10 (22 Sep 2003)
mkfs.vfat: unable to open /mnt/removable/
[root@www bob]#


due to my limited understanding, i'm most likely committing some basic error here, so i just stuck the thing into a WinXP box and deleted the offending item there (no probs at all). then i formatted the stick FAT32 just for good measure and it is working fine in linux again.

i wonder if these problems are due to me pulling the USB stick without umounting it first :scratch: i hadn't realised it was a no-no...

pistonbrew 02-03-2005 06:05 AM

hi

unfortunately i've got rid of /TubeCLock now (see above post), and i have no idea why or what caused the circular file structure. if i tried to delete or move it in the GUI it would get to around the 400th folder before erroring out, and in shell it would error with the "Circular..." message.

would love to know why!

thanks for the suggestion anyway

bob



Quote:

Originally posted by KimVette
if you go to /Tubeclock and do an 'ls -l' what do you see? Do you see something resembling:

[code]

user@foo:/Tubeclock>Tubeclock -> ../Tubeclock

[code]

or anything remotely similar? Usually when you have an error regarding a circular file reference you have a file linked to "." or something equally dopey. If you try to traverse it in a shell prompt it won't do much of anything but graphical file managers are often too stupid to trap such conditions - garbage in | garbage out applies in those cases. You need to find where that link is and remove it. This is of course if I have a correct understanding of the symptom.



All times are GMT -5. The time now is 12:00 AM.