|
|
The file that wouldn't die
|
|
|
|
Fresh-Faced Recruit
Join Date: Jun 2000
Status:
Offline
|
|
There's file that simply will not be killed. As far as I can tell, it's not taking up any space, but it also results in my trash can never being empty, which is frustrating for someon who likes their computer clean (wish I could say the same for the rest of my workspace).
Anyway, I've tried all the traditional UNIX tricks (rm, rm -rf) and this guy still won't go away. I think it might be due to some wacky characters in the name, but attempting to rename it via the Finder or the Terminal doesn't seem to be a go.
Any thoughts? This certainly isn't wreaking havoc on my machine, but it's wreaking havoc on my brain!
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: May 2001
Status:
Offline
|
|
And do you get any error messages? What is the origin of that file? Are you the owner? Are any immutable flags set? Is it "locked" in the Finder info?
-
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jun 2000
Status:
Offline
|
|
Originally posted by Moonray:
And do you get any error messages? What is the origin of that file? Are you the owner? Are any immutable flags set? Is it "locked" in the Finder info?
-
I can't get info in the Finder, because clicking on it causes it to disappear (only to reappear when that folder is opened again). Running ls -l in the Terminal gives the message that the file does not exist.
The file was once/still is an MP3 whose ID3 tags were seriously munged. Since I was re-importing that CD to AAC anyway, I tossed out the MP3.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: May 2001
Status:
Offline
|
|
Can you move it into a folder and trash the folder?
Try in the Terminal to delete the trash folder with its contents:
rm -r /Users/<yourshortname>/.Trash
or, if it is on a different partition:
rm -r /Volumes/<volumename>/.Trashes/501
(assuming your user ID is 501).
-
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jun 2000
Status:
Offline
|
|
Originally posted by Moonray:
Can you move it into a folder and trash the folder?
Try in the Terminal to delete the trash folder with its contents:
rm -r /Users/<yourshortname>/.Trash
or, if it is on a different partition:
rm -r /Volumes/<volumename>/.Trashes/501
(assuming your user ID is 501).
-
Yeah, seems like rm still throws the error saying that the file doesn't exist. Then, of course, its folder can't be deleted because it's not empty.
I appreciate the suggestions... any other ones?
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
You can remove it by inode number.
First, do ls -i
You will see something like this:
Code:
[dshaw@flybook ~/games] ls -i
758664 Makefile 758669 make_level.c 758674 query.c
758665 extern.c 758670 move.c 758675 rnd_pos.c
758666 flush_in.c 758671 move_robs.c 758676 robots.6
758667 init_field.c 758672 pathnames.h 758677 robots.h
758668 main.c 758673 play_level.c 758678 score.c
The numbers next to the filenames are the inode numbers. Then, do this:
find . -inum inode_number -exec rm {} \;
Replacing inode_number with the number for the file. That will delete it if it's a filename issue.
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
|
|
|
|
|
|
|
Senior User
Join Date: Aug 2003
Location: united states empire
Status:
Offline
|
|
Here's an option that many people don't know about; it can edit directories and it's great for deleting files with strange characters in their names, etc:
emacs /Users/<yourshortname>/.Trash
and then just delete the line referring to your problem file. After that, hit control-x, control-s, control-x, control-c, and you're done!
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jun 2000
Status:
Offline
|
|
Originally posted by lenox:
Here's an option that many people don't know about; it can edit directories and it's great for deleting files with strange characters in their names, etc:
emacs /Users/<yourshortname>/.Trash
and then just delete the line referring to your problem file. After that, hit control-x, control-s, control-x, control-c, and you're done!
This sounds so promising, but emacs doesn't want to edit the buffer because it's read only. I'm not much of an emacs wizard, so how can I trick it into editing this?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|