How to delete rouge files created under msdos?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to delete rouge files created under msdos?

ze phyr
Hello list,

A rouge script created many directories with a file name

"you.cant.delete..\"    (the quote marks are not part of the file name).

Now, I can delete them under pure DOS first by using  dir /x to
identify them, and then using rd to remove them.

But it is very hard to delete files created like this under Linux.

1. The appear like a directory. But when I list it, the system says it
can't find the file.
2. Tried to delete it using its inode number, but its inode constantly
increase by one every time it is listed. find command can't see them
either.
3. Of course rm -rf didn't work either.

how can I delete this rouge file wicked name under Linux? By the way,
how to create files like this?

--
phyrster


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to delete rouge files created under msdos?

Douglas A. Tutty-2
On Mon, Nov 17, 2008 at 08:54:22AM +0800, ze phyr wrote:

> A rouge script created many directories with a file name
>
> "you.cant.delete..\"    (the quote marks are not part of the file name).
>
> Now, I can delete them under pure DOS first by using  dir /x to
> identify them, and then using rd to remove them.
>
> But it is very hard to delete files created like this under Linux.
>
> 1. The appear like a directory. But when I list it, the system says it
> can't find the file.
> 2. Tried to delete it using its inode number, but its inode constantly
> increase by one every time it is listed. find command can't see them
> either.
> 3. Of course rm -rf didn't work either.
>
> how can I delete this rouge file wicked name under Linux? By the way,
> how to create files like this?

I've only come accross this once.  I used mc.  Does it show up in a
browser (mc, lynx, konqueror) that otherwise lets you delete files?

Can you move it?  Can you rename it?

Doug.


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to delete rouge files created under msdos?

Ron Johnson
In reply to this post by ze phyr
On 11/16/08 18:54, ze phyr wrote:

> Hello list,
>
> A rouge script created many directories with a file name
>
> "you.cant.delete..\"    (the quote marks are not part of the file name).
>
> Now, I can delete them under pure DOS first by using  dir /x to
> identify them, and then using rd to remove them.
>
> But it is very hard to delete files created like this under Linux.
>
> 1. The appear like a directory. But when I list it, the system says it
> can't find the file.
> 2. Tried to delete it using its inode number, but its inode constantly
> increase by one every time it is listed. find command can't see them
> either.
> 3. Of course rm -rf didn't work either.
>
> how can I delete this rouge file wicked name under Linux? By the way,
> how to create files like this?

$ touch you.cant.delete..\\
$ dir you.cant.delete*
-rw-r--r-- 1 me me 0 2008-11-16 19:36 you.cant.delete..\

Note how I escaped the backslash.

$ rm you.cant.delete..\\
removed `you.cant.delete..\\'
$ dir you.cant.delete*
ls: cannot access you.cant.delete*: No such file or directory

Since \ is the "escape character", any time you want to use a
backslash as a backslash, you must escape it.

--
Ron Johnson, Jr.
Jefferson LA  USA

If you don't agree with me, you are worse than Hitler!!!


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]