[PLUG] strange problem in removing 2 files named "." and ".."

website reader website.reader3 at gmail.com
Sat Sep 11 07:21:36 UTC 2010


For those who would like to know, apparently a multibyte or wide
character in the file name caused major problems.  The rm command
clobbered the name, and removed the directory listing, but was unable
to actually remove the file, and subsequently any further rm or rmdir
commands failed, with an error report that the directory was non-empty
(which is true)

Here's the error listing
knoppix at Microknoppix:/media/hdc1/windows/SendTo$ stat 3*
  File: `3\275 Floppy (A).lnk'
  Size: 129       	Blocks: 64         IO Block: 32768  regular file
Device: 1601h/5633d	Inode: 43011       Links: 1
Access: (0777/-rwxrwxrwx)  Uid: ( 1000/ knoppix)   Gid: ( 1000/ knoppix)
Access: 2007-12-26 00:00:00.000000000 +0000
Modify: 2005-04-23 14:46:24.000000000 +0000
Change: 2005-04-23 15:48:36.000000000 +0000

The stat command fails:

cp: cannot stat `./windows/SendTo/3\275 Floppy (A).lnk': Invalid or
incomplete multibyte or wide character

The \275 is some type of multibyte character?


On 9/10/10, website reader <website.reader3 at gmail.com> wrote:
> Okay, I took the hammer to the folder and removed it.
>
> 1. I tried to stop the ntfs mount under Knoppix, not successful, so I
> did an init 6 command to stop Knoppix
>
> 2. I then yanked the hard-drive off the computer and mounted it on my
> Windows XP system.
>
> 3. I then successfully remove the 2 folders.
>
> 4. I then could NOT remove the USB mounted drive, so I had to kill Windows
> XP
>
> 5. After Windows XP came down, I yanked the hard drive off the system
>
> 6. I remounted the hard drive under Knoppix again.
>
> 7. I am currently doing a vfat partition to ntfs partition backup under
> Knoppix
>
> I honestly think that I had a file that should be used to troubleshoot
> a bug in the mount.ntfs thread under linux.  Apparently I had a file
> or directory that the linux OS cannot handle
>
> Sigh.. this has consumed some time, and forced me to reboot 2 systems
> to successfully remove that pesky file.
>
> Anyways, problem solved.
>
>
> On 9/10/10, website reader <website.reader3 at gmail.com> wrote:
>> Here's the result of the "stat filename" command -
>>
>> root at Microknoppix:/media/sdc2/Windows-98/windows# stat SendTo
>>   File: `SendTo'
>>   Size: 4096      	Blocks: 8          IO Block: 4096   directory
>> Device: 822h/2082d	Inode: 155231      Links: 1
>> Access: (0777/drwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
>> Access: 2010-09-11 05:34:46.000000000 +0000
>> Modify: 2010-09-11 05:34:33.000000000 +0000
>> Change: 2010-09-11 05:34:33.000000000 +0000
>> root at Microknoppix:/media/sdc2/Windows-98/windows#
>>
>> I still cannot remove this folder from the NTFS partition.
>>
>> I am trying to carefully archive data from a corrupted system and
>> running under Knoppix 6.01 CD so I can safely do this.
>>
>>
>>
>> On 9/10/10, website reader <website.reader3 at gmail.com> wrote:
>>> Sorry for misleading the general reader, I DO understand that "." and
>>> ".." are in the file structure.
>>>
>>> There IS some type of hidden file in the folder.
>>>
>>> I tried using the "stat filename" command to locate the inode and then
>>> use the "find . -inum inode# -exec rm -i -d -r * \;" command but it
>>> still won't delete the folder.
>>>
>>> Is there any lower level command that can actually go in and remove that
>>> inode?
>>>
>>>
>>>
>>> On 9/10/10, Ron Braithwaite <ron at braithwaites.net> wrote:
>>>> On Sep 10, 2010, at 10:54 PM, website reader wrote:
>>>>
>>>>> I am unable to delete two files on a hard-drive that originally was in
>>>>> a ntfs partition.
>>>>> The files are named "." and ".."
>>>>>
>>>>> Trying to use the rm -r -f command fails as does the rmdir command.  I
>>>>> tried renaming them but that fails too.
>>>>>
>>>>> I really need to remove these two files, how can I tell the linux OS
>>>>> that they are not being used as a folder relocation command and
>>>>> actually remove them?
>>>>
>>>> Well, the reason you can't remove them is that "." is your current
>>>> directory
>>>> and ".." is the parent directory.
>>>>
>>>> May I suggest reading:
>>>>
>>>> http://www.cyberciti.biz/tips/understanding-unixlinux-file-system-part-i.html
>>>>
>>>> -Ron
>>>> _______________________________________________
>>>> PLUG mailing list
>>>> PLUG at lists.pdxlinux.org
>>>> http://lists.pdxlinux.org/mailman/listinfo/plug
>>>>
>>>
>>
>



More information about the PLUG mailing list