Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > The file that wouldn't die

The file that wouldn't die
Thread Tools
napthali
Fresh-Faced Recruit
Join Date: Jun 2000
Status: Offline
Reply With Quote
Feb 22, 2004, 04:19 PM
 
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!
     
Moonray
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Feb 22, 2004, 05:26 PM
 
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?

-
     
napthali  (op)
Fresh-Faced Recruit
Join Date: Jun 2000
Status: Offline
Reply With Quote
Feb 22, 2004, 06:15 PM
 
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.
     
Moonray
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Feb 22, 2004, 06:34 PM
 
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).

-
     
napthali  (op)
Fresh-Faced Recruit
Join Date: Jun 2000
Status: Offline
Reply With Quote
Feb 23, 2004, 09:46 PM
 
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?
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Feb 23, 2004, 10:15 PM
 
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
     
lenox
Senior User
Join Date: Aug 2003
Location: united states empire
Status: Offline
Reply With Quote
Mar 1, 2004, 03:30 PM
 
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!
     
napthali  (op)
Fresh-Faced Recruit
Join Date: Jun 2000
Status: Offline
Reply With Quote
Mar 1, 2004, 03:50 PM
 
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 Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:10 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,