LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   deletion of a recursive directory? (https://www.linuxquestions.org/questions/linux-software-2/deletion-of-a-recursive-directory-410708/)

captainnico 02-02-2006 12:37 AM

deletion of a recursive directory?
 
Don't ask how this happened, because I don't know. I was using my external 200GB HD (Western digital) in windows xp using the ext2fsd drivers (it's formatted as ext3). Now that I bought a new case for it, there's a weird recursive directory in it. No, it's not just a link. I'm no noob to linux, but this is weird. How can I remove it? rm -rf just leads to recursion madness and never deletes anything. I guess the question is, can I remove it?

pixellany 02-02-2006 06:01 PM

I don't know what a "recursive directory" is??? What exactly do you see?
I infer you are viewing it from Linux, if you tried rm -rf.
Can you also access the drive from Windows? How does the weird thing appear then?

captainnico 02-03-2006 01:53 AM

if I cd into it, I'm still where I started, if I cd .. out of it, it takes me up a level. I can't rm -rf because the r stands for recursive, and since it's going to keep deleting the folder inside itself, it will never delete anything because it goes infinitely deep into this folder that leads to its own location. In other words, rm -rf is the same as changing into the directory and deleting the contents, then deleting the folder. This doesn't work here because the folder and the contents are one and the same. It's trippy, I know. Konqueror ignores this folder. It literally has no name. To cd into it, I have to type cd .// Windows does not see the folder using the ext2fsd, but it sees it from my linux samba share. It's not doing any harm or taking up any space, it's just an extremely odd phenomena that I would like to get rid of or at least understand.

pixellany 02-03-2006 07:35 AM

What if you move it into a new empty directory, then rm -f that new directory? just a hunch..

Vagrant 02-03-2006 02:30 PM

That's a really interesting problem. If you do a lsattr on the directoy, do you see any odd attributes? There is a similar problem, unrelated, that Novell shares have with Apple, I forgot the specifics but it does what you describe, so you're not crazy. This is something that happens. My guess is that its due to some sort of obscure bug.

captainnico 02-04-2006 05:02 AM

nothing odd, the folder in question shows up as simply ./
I really don't think there is a solution, and that this was caused by a bug in the ext2fsd, that or windows, but I think I already blame most computer problems on windows, so I'm gonna give it a break this time.

dr_zayus69 02-04-2006 05:16 AM

i thought ./ in linux meant the current directory and ../ means the parent directory. If you do ls -a you should see . and .. in every directory. That kind of sounds what your describing but i dunno. Hard to tell unless i could see it for myself.

pixellany 02-04-2006 05:26 AM

The gallopping nitpicker strikes....;)

current directory is simply "." Typically not used except--eg--in "./file" to run "file" without the system looking in PATH
parent directory is ".." As in "cd .." to go one up--or "cd ../newplace" to go sideways

dr_zayus69 02-04-2006 05:39 AM

yeah but /sbin and /sbin/ are the same thing. You can leave the backslash off. But if you did that with trying to run a script like .scriptname it might get confused and think the . is part of the scriptname. What is a galloping nitpicker?

pixellany 02-04-2006 05:52 AM

Quote:

Originally Posted by dr_zayus69
yeah but /sbin and /sbin/ are the same thing. You can leave the backslash off. But if you did that with trying to run a script like .scriptname it might get confused and think the . is part of the scriptname. What is a galloping nitpicker?

Now we are at the Nitpickers convention.....;)

/xxx and /xxx/ might be the same in some contexts, but certainly not others---consider this:

mv filename /xxx
mv filename /xxx/
VERY different outcomes!!

Technically, the "/" is the divider between directory names, n'est-ce pas?
When we refer to the "root" directory, are we not really referring to an invisible directory name followed by "/"?
/sbin means go the top--no name--directory and then down one to sbin. to get the the very top, you type "/" because you can't type the invisible name!!

A "galloping nitpicker" is someone who writes posts like this....;)


All times are GMT -5. The time now is 03:57 PM.