Removing a funny file
Alright,
This file named is a file I cannot seem to rename or move... ?<?????>??×??B??áŠ<????d=?????jm???z?N??T?G?9???!sd!y?7o??-yJU?????_|????????9???Z?Z??{?>@? Any suggestions? Tried: rm ./?<?????>??×??B??áŠ<????d=?????jm???z?N??T?G?9???!sd!y?7o??-yJU?????_|????????9???Z?Z??{?>@? |
You don't need the
Code:
./ Code:
rm ? <TAB> |
Where is the file, in which directory?
What are the permissions on the file? Who is the owner of the file? Exactly how did you try to rename/move it? |
Quote:
|
I'd begin to wonder why a file like that exists. Some file structure issue or partition overlapping??
I'd check the file structure and maybe test the partitions to be sure they are correct. Boot to a live cd and remove the file would be last but I'd make a backup of any important data before you did it. |
I'm with jefro; very good advice.
A technique I've used for really recalcitrant files is to move all required files out of that dir, then cd one level up and Code:
rm -rf thatdir |
Also you can list files by inode (\'ls -il') and use 'find . -inum [INODE_NR] -exec rm -i {} \;' to remove it.
|
I concur with the above. There are two possibilities that I can see.
1) There has been some kind of file system corruption, resulting in a file with a garbage name (it may not even be a real file, but just some kind of ghost data structure). So the FS should be scanned for errors first, before doing anything else. If this is coming from a network share, the file should be checked on the source machine, just in case the problem is due to the share connection. 2) Somehow a file was accidentally created or renamed with a funky name. This is easier to handle, as all you need to do is correctly use quoting, globbing, tab completion, or the inode to remove/rename it, according to the advice given above. It would be nice if the OP could post any details he has on how the file was created, what file system it's sitting on, what ls -il shows for that file when run on its directory, and any other possibly-relevant information. |
Thanks Folks
So many options with posted! I was able to remove the file and I think in the past, some directory corruption occurred, but it appears I could remove the file with no impact.
Cheers, Brent. |
All times are GMT -5. The time now is 05:03 AM. |