Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mikebatho

macrumors 6502a
Original poster
Jun 1, 2004
807
2
Greater Manchester UK
I've got some sit. files & stuff on my desktop that won't delete. It keeps saying that they're in use by another function, like copying, moving or emptying trash. Problem is, they're not!!!

I've restarted, relaunched finder, unhooked the internet....

Is there a way to force them to delete, then force the trash to empty...?
 
easiest way is to use the terminal.

pull up a terminal window.

if you have files on desktop you want to remove, type:

rm Desktop/[filename]

if you have stuff in the trash that won't empty, type:

rm -r .Trash/
 
mikebatho said:
I've got some sit. files & stuff on my desktop that won't delete. It keeps saying that they're in use by another function, like copying, moving or emptying trash. Problem is, they're not!!!

I've restarted, relaunched finder, unhooked the internet....

Is there a way to force them to delete, then force the trash to empty...?

This is going to sound silly but... :)

Rename the offending file to something like "deleteme.rtf" Open it with text edit. Save the file in text edit. Delete the file off your desktop. A download from Internet Explorer is the most typical culprit in the locked file case (although not all the time).
 
Go to macupdate and dl a program called Tra****. All you have to do is drag the file on the trash it icon and it will force delete it. You can even force secure delete it.
 
I've had a file that wouldn't delete in the trash can for a couple of days and did the terminal command and it worked great. Thanks.



jxyama said:
easiest way is to use the terminal.

pull up a terminal window.

if you have files on desktop you want to remove, type:

rm Desktop/[filename]

if you have stuff in the trash that won't empty, type:

rm -r .Trash/
 
if u hv the dmg still mounted, it wont delete it. So you hv to unmount it. Also, if you are reading the read me , and keep it open in textedit, and then trash the package and delete, it wd say its in use..
if its none of the above, then as others have pointed out, just use the terminal.

p.s. it shouldnt happen normally. so whenever u mount an image on the desktop, first copy the icon in your hard disk, and then run it. then just unmount , and delete..

cheers
 
mikebatho said:
I've got some sit. files & stuff on my desktop that won't delete. It keeps saying that they're in use by another function, like copying, moving or emptying trash. Problem is, they're not!!!

I've restarted, relaunched finder, unhooked the internet....

Is there a way to force them to delete, then force the trash to empty...?

A program called Sloth might be useful - it should reveal what program/process is keeping the file open. You should be able to find it on versiontracker.com
 
actually, if you want to use rm, an rm -r might work, but an rm -rf is a better idea.
mmm sudo rm -rf / baby :p (just joking, plz do not try that)
 
Hoorah!!! success!!!

Using text edit worked a treat. Had to click on the ignore fancy text thingy boxt to get it to open in TE, but then once saved, away it went quite happily to the bin....

Good job, because some of us don't know anything about computers, and don't know what THE TERMINAL is..!!!!!

Cheers.
 
mikebatho said:
Good job, because some of us don't know anything about computers, and don't know what THE TERMINAL is..!!!!!
Bah!!! Terminal.app should be your best friend in Mac OS X :p
Its in Applications > Utilities. Called the Terminal. It's an application. If used properly, it can do wonders, and maybe save your ass once in a while too. :)
And you never know, it might come handy one day. And Fink and Darwinports is so much nicer when used sans crap like FinkCommander :x
 
Yeah I remember it doing the same when I mentioned a Matsu****a CD-ROM drive a few months back. I didn't even notice that it had "****" in it until the filter picked it up :rolleyes:
 
This has been mentioned before, but if you have a file that OSX insists is in use and you can't figure out how, use the lsof command in terminal and it will tell you what process(es) has it open. Something like this:

bash> lsof myFile.txt

Then you can kill -9 the process if necessary.
 
press the option key, during the deletion...it worked in classic and works for me. I was having trouble uninstalling Norton stuff and I was recommended to do this and it works
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.