PDA

View Full Version : Tiếng Việt.html file I can not get rid of




SURF2DY
Jun 4, 2008, 01:57 PM
I have tried everything to delete this file
Renaming
Terminal (rm -rt)
nothing works...Can anybody help?



robbieduncan
Jun 4, 2008, 01:59 PM
Are there any other .html files you need to keep in the same directory? If not rm *.html would likely work. Why can't you delete it? Permission denied or you can't get the system to accept the filename?

SURF2DY
Jun 4, 2008, 02:02 PM
every time you try to rename it, it will not let you and
an unexpected error occurred (error code -43) appears

lee1210
Jun 4, 2008, 02:10 PM
In the worst-case scenario, you should be able to move anything of value in the directory and any subdirectories then rm -rf the containing directory. I doubt even a very wily file would have the skills to prevent the directory it's in from being blasted.

Another tact might be to rename it. That may be tough, but the first letter seems pretty standard. You might try to just type:
mv Ti<tab>
and see if tab completion gives you a nicely escaped filename. If so, just type an easier filename as the second argument and hopefully it will be moved successfully.

If things get particularly dire using find with an exec directive might work, but I can't say so for sure.

-Lee

SURF2DY
Jun 4, 2008, 02:25 PM
I've tried both options above and still no luck
the rm -rf states:
rm: illegal option -- /
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
and
renaming it anything wont work it just gives you the error message
(error code -43)

yeroen
Jun 4, 2008, 03:26 PM
Whenever I have to remove a file with a name the shell doesn't recognize, I have to include the directory it's as as argument to rm, as such:

rm -f ./*.html

Assuming you don't mind blowing away any other html files in that directory, does that line work?

The (-43) error is most likely the value of the shells 'errno' variable. You can look it up in /usr/include/errno.h to see what 43 maps to. It can vary from system to system, but on Linux I see:

...
#define EIDRM 43 /*Identifier Removed*/
...

SURF2DY
Jun 4, 2008, 04:10 PM
Thanks - tried it and it still does not get rid of the file

yeroen
Jun 4, 2008, 04:53 PM
And you can't delete it in Finder?

Sayer
Jun 4, 2008, 06:26 PM
-43 is a fine not found error.

You should run Disk Utility and verify the hard drive. You prolly have some bad data on the disk.

If you have any Mac OS X disc, or the discs that came with the Mac boot from one and run Disk Utility to repair the drive.

HiRez
Jun 4, 2008, 08:05 PM
Why not move everything else in that folder into a temporary folder, then delete the whole folder, create a new one, and move the old stuff back. But I agree with Sayer, verify the disk and permissions first.

SURF2DY
Jun 5, 2008, 12:01 PM
Thank for all your help, but this file is not going anywhere.
The file "Tiếng Việt.html" is in it's own folder called "Legal"
I can delete the whole folder but then it just sits in the trash
and will not permanently delete, it will just stay in the trash
all other items in the trash get deleted but this folder will not go

Any other ideas?

yeroen
Jun 5, 2008, 12:12 PM
Thank for all your help, but this file is not going anywhere.
The file "Tiếng Việt.html" is in it's own folder called "Legal"
I can delete the whole folder but then it just sits in the trash
and will not permanently delete, it will just stay in the trash
all other items in the trash get deleted but this folder will not go

Any other ideas?

What are the ownership and permissions of the parent Legal directory? If you do an

ls -l Legal

who's are they owned by and is the sticky bit set (a 't' at the end)? If it the sticky bit is set, even if you have write permission to the directory, if the .html file isn't owned by you won't be able to delete it.

Just sudo to root and try removing it then.

SURF2DY
Jun 5, 2008, 12:36 PM
This is what I get when I try ls -1 Legal
lb0004:~ sandymartinez$ ls -1 legal/Users/sandymartinez/Desktop/Legal.rtf/
ls: legal/Users/sandymartinez/Desktop/Legal.rtf/: No such file or directory

I dont know what sudo to root is?

Thanks for all your help, but I guess Im just going to have to
live with this file in the trash.:apple:

operator207
Jun 5, 2008, 04:15 PM
Try doing everything in this article: http://www.macfixit.com/article.php?story=20070327092656342

Gotta love Adobe Products. I am pretty sure this was the article I used when I had this problem last year.

yeroen
Jun 5, 2008, 04:47 PM
This is what I get when I try ls -1 Legal
lb0004:~ sandymartinez$ ls -1 legal/Users/sandymartinez/Desktop/Legal.rtf/
ls: legal/Users/sandymartinez/Desktop/Legal.rtf/: No such file or directory

I dont know what sudo to root is?

You want to type ls -l (the letter 'l', not the number '1') to get the full listing with permissions, so type as shown:

ls -ld ~/Desktop/Legal.rtf

ls -l ~/Desktop/Legal.rtf

This prints out the directory and file permission bits. Post them here when you're done.

Sudo'ing to root means switching to the root user, where you enjoy omnipotent godlike privileges on your system. You can remove the file as root in one shot by typing:

sudo rm -R /Users/sandymartinez/Desktop/Legal.rtf

I left off the 'f' option here so rm will prompt you to make sure you want to delete (this protects you in case you put a space between '/' and 'Legal.rtf', which would otherwise blow away your entire desktop..every UNIX user has accidentally done this to their horror sometime in their lives). Unless some process has the contents of this file memory mapped (which I doubt), this will remove the file.

SURF2DY
Jun 5, 2008, 05:06 PM
You want to type ls -l (the letter 'l', not the number '1') to get the full listing with permissions, so type as shown:

ls -ld ~/Desktop/Legal.rtf

ls -l ~/Desktop/Legal.rtf

This prints out the directory and file permission bits. Post them here when you're done.

Sudo'ing to root means switching to the root user, where you enjoy omnipotent godlike privileges on your system. You can remove the file as root in one shot by typing:

sudo rm -R /Users/sandymartinez/Desktop/Legal.rtf

I left off the 'f' option here so rm will prompt you to make sure you want to delete (this protects you in case you put a space between '/' and 'Legal.rtf', which would otherwise blow away your entire desktop..every UNIX user has accidentally done this to their horror sometime in their lives). Unless some process has the contents of this file memory mapped (which I doubt), this will remove the file.

lb0004:~ sandymartinez$ ls -ld ~/Desktop/Legal.rtf
drwxrwxrwx 3 sandymar admin 102 Jun 5 13:35 /Users/sandymartinez/Desktop/Legal.rtf
lb0004:~ sandymartinez$ ls -l ~/Desktop/Legal.rtf
ls: Tiếng Việt.html: No such file or directory
lb0004:~ sandymartinez$ sudo su
lb0004:/Users/sandymartinez root# rm -R /Users/sandymartinez/Desktop/Legal.rtf
rm: /Users/sandymartinez/Desktop/Legal.rtf/Tiếng Việt.html: No such file or directory
rm: /Users/sandymartinez/Desktop/Legal.rtf: Directory not empty
lb0004:/Users/sandymartinez root#

JNB
Jun 5, 2008, 05:16 PM
Silly question, but have you tried rebooting after placing the file (or entire directory) in the Trash, then after restart, emptying the Trash?

Another utility that's never failed for me is SuperEmptyTrash (http://www.faqintosh.com/risorse/en/sys/setrash/).

SURF2DY
Jun 5, 2008, 05:25 PM
Silly question, but have you tried rebooting after placing the file (or entire directory) in the Trash, then after restart, emptying the Trash?

Another utility that's never failed for me is SuperEmptyTrash (http://www.faqintosh.com/risorse/en/sys/setrash/).

I have tried to reboot and it still will not delete
Also just tried your SuperEmptyTrash and it wont get rid of the files either
it says the directory is not empty

yeroen
Jun 5, 2008, 05:29 PM
You either have a corrupted inode or (more likely) the Tieng file has non-printable characters in the file name.

If you go into the Legal.rtf directory and type in

rm -f *Ti*

does that remove it?

JNB
Jun 5, 2008, 06:12 PM
I have tried to reboot and it still will not delete
Also just tried your SuperEmptyTrash and it wont get rid of the files either
it says the directory is not empty

OK, I kinda doubted based on your reports thus far that it would work, but sometimes it's the little things that get overlooked.

SURF2DY
Jun 5, 2008, 06:54 PM
You either have a corrupted inode or (more likely) the Tieng file has non-printable characters in the file name.

If you go into the Legal.rtf directory and type in

rm -f *Ti*

does that remove it?

How do you get into the directory?

yeroen
Jun 5, 2008, 07:31 PM
How do you get into the directory?

cd /Users/sandymartinez/Desktop/Legal.rtf

SURF2DY
Jun 6, 2008, 11:28 AM
cd /Users/sandymartinez/Desktop/Legal.rtf

still does not remove it

lb0004:~ sandymartinez$ cd /users/sandymartinez/desktop/legal.rtf
lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$ rm -f*ti*
rm: illegal option -- *
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file

yeroen
Jun 6, 2008, 11:57 AM
you need to put a space between the 'f' and the first '*', and use a capital 'T', exactly as so:

rm -f *Ti*

SURF2DY
Jun 6, 2008, 12:04 PM
you need to put a space between the 'f' and the first '*', and use a capital 'T', exactly as so:

rm -f *Ti*

Noted, but I have tried it both ways and it still does not get rid of the file
lb0004:~ sandymartinez$ sudo su
Password:
lb0004:/Users/sandymartinez root# cd /users/sandymartinez/desktop/legal.rtf
lb0004:/users/sandymartinez/desktop/legal.rtf root# rm -f *Ti*
lb0004:/users/sandymartinez/desktop/legal.rtf root#
and w/out sudo to root
lb0004:~ sandymartinez$ cd /users/sandymartinez/desktop/legal.rtf
lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$ rm -f *Ti*
lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$

SURF2DY
Jun 6, 2008, 12:07 PM
you need to put a space between the 'f' and the first '*', and use a capital 'T', exactly as so:

rm -f *Ti*

I have tried it both ways, and still no luck

yeroen
Jun 6, 2008, 03:29 PM
Go into the Legal.rtf directory. Do:

ls -lq

The 'q' option shows nonprintable characters in the filename as a '?' character. I'm curious to see if that's part of the problem.

SURF2DY
Jun 6, 2008, 04:42 PM
Go into the Legal.rtf directory. Do:

ls -lq

The 'q' option shows nonprintable characters in the filename as a '?' character. I'm curious to see if that's part of the problem.

lb0004:~ sandymartinez$ cd /users/sandymartinez/desktop/legal.rtf
lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$ ls -lq
ls: Tiếng Việt.html: No such file or directory
lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$

SamMiller0
Jun 6, 2008, 04:46 PM
try:

ls -b

it should display non-printable characters using their octal equivalents.

SURF2DY
Jun 6, 2008, 05:08 PM
try:

ls -b

it should display non-printable characters using their octal equivalents.

lb0004:~ sandymartinez$ cd /users/sandymartinez/desktop/legal.rtf
lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$ ls -b
Tie\314\202\314\201ng Vie\314\202\314\243t.html
lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$

yeroen
Jun 6, 2008, 05:13 PM
While in legal.rtf, do:

stat -x *

That'll give you the Inode numbers of all files in the directory, including this troublesome Tieng file. We are going to remove this file, not by name but by Inode number. Post this number here.

yeroen
Jun 6, 2008, 05:13 PM
<duplicate post>

SURF2DY
Jun 6, 2008, 05:22 PM
<duplicate post>

lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$ stat -x *
stat: Tiếng Việt.html: stat: No such file or directory
lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$

yeroen
Jun 6, 2008, 05:35 PM
Ok, since we had some luck with 'ls -b', let's do it again and get the inode number with 'i', i.e.

ls -ib

That should print out something like:

123456 Tie\314\202\314\201ng Vie\314\202\314\243t.html

where '123456' is the files inode number. Take that number and use it as follows:

find . -inum 123456 exec rm -f {} \;

SURF2DY
Jun 6, 2008, 05:48 PM
Ok, since we had some luck with 'ls -b', let's do it again and get the inode number with 'i', i.e.

ls -ib

That should print out something like:

123456 Tie\314\202\314\201ng Vie\314\202\314\243t.html

where '123456' is the files inode number. Take that number and use it as follows:

find . -inum 123456 exec rm -f {} \;

lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$ ls -ib
ls: Tiếng Việt.html: No such file or directory

Consultant
Jun 6, 2008, 05:49 PM
With the file in trash, hold option key, and do empty trash.

SURF2DY
Jun 6, 2008, 06:21 PM
With the file in trash, hold option key, and do empty trash.

No Luck

Sbrocket
Jun 6, 2008, 06:42 PM
Are you sure that you verified the integrity of your filesystem with Disk Utility? This sounds like filesystem corruption to me.

yeroen
Jun 6, 2008, 08:16 PM
I'd try swapping the order of the 'b' and 'i' arguments to ls, so 'ls -bi' instead of 'ls -ib', and try my suggestion one more time.

If that doesn't work, then I'm guessing your filesystem is corrupted. You can either run fsck as root or open /Applications/Utilities/Disk Utility.app and check the integrity of your filesystem.

sord
Jun 6, 2008, 08:28 PM
Out of curiosity, I tried to reproduce:
craig:~/tmp# touch "`echo $'Tie\314\202\314\201ng Vie\314\202\314\243t.html'`"
craig:~/tmp# ls
Tiếng Việt.html
craig:~/tmp# rm Tiếng\ Việt.html
craig:~/tmp# ls
craig:~/tmp#

I'm guessing possible disk issue -- I would run fsck as suggested.

Also -- what filesystem are you using? (Open Disk Utility, select your partition, then at the bottom of the app read Format)

SURF2DY
Jun 10, 2008, 03:46 PM
Thanks everyone for your help, file system needed minor repair
problem fixed and files deleted. Thanks again.

weg
Jun 10, 2008, 05:15 PM
I have tried everything to delete this file
Renaming
Terminal (rm -rt)
nothing works...Can anybody help?

I had a similar problem. I ended up moving the file to /tmp/ to get rid of it (that worked), but I don't know why.

yeroen
Jun 10, 2008, 07:51 PM
I had a similar problem. I ended up moving the file to /tmp/ to get rid of it (that worked), but I don't know why.

different partition?