Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 8, 2008, 08:54 PM   #1
i.shaun
macrumors 6502a
 
Join Date: May 2008
Location: Canada
Send a message via AIM to i.shaun
Unable To Empty Trash (Files In Use)

This may sound simple, and I did search the forums. One thread suggested holding down "Option", that did nothing. "Command" "control" or any combination of the Three also did nothing.

Another Thread gave a program called "Force Empty Trash". It is only tested on 10.3 or something, I run Tiger 10.4. I Ran the program anyway, and the Trash emptied, but then the Phantom Files Returned.


The files in question are Corrupted iTunes music folders that had nothing in them, but I couldn't access them. "File Cannot Be Read Or Written"

I Tried Deleting them, and most moved to Trash -- one was stubborn. A Repair of Disk Permissions Made it enter the Trash Bin -- and that is where they Remain.


I rebooted, and attempted an Empty, but It tells me "File Is In Use" despite the fact that; A: iTunes is closed, and B: It was part of a different iTunes Library (I moved, and re-added everything after dealing with the corrupt folders)


So now I am at a Loss as to how to get rid of these files. They are not locked, and are set for me to "Read & write" in the Permissions. Is there a program that would Tell me what Processes are linked to the folders? What could still be accessing them?


I was told maybe I have a Virus, if so, what are the best up-to-date OS X Virus scanners?
__________________

17" iMac, OS X 10.4.11 Tiger, 32GB iPod Touch, Airport Extreme
i.shaun is offline   0 Reply With Quote
Old Jul 8, 2008, 09:00 PM   #2
GGJstudios
macrumors Westmere
 
Join Date: May 2008
Did you see the suggestions in this thread? Or this page, from a simple Google search?

One thing is for sure: it's not a virus! There are no viruses that affect Macs.

Last edited by GGJstudios; Jul 8, 2008 at 09:08 PM.
GGJstudios is offline   -1 Reply With Quote
Old Jul 8, 2008, 09:10 PM   #3
i.shaun
Thread Starter
macrumors 6502a
 
Join Date: May 2008
Location: Canada
Send a message via AIM to i.shaun
I did not see that thread, I tried the steps. No luck.


I cannot Delete from Trash because I get "File In Use"

I cannot move them onto the desktop, I get "Some Of The Data Could Not Be Read Or Written Error -36"

I attempted the Terminal command from the Trash Bin instead of the desktop and get:

rm: illegal option -- -
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
__________________

17" iMac, OS X 10.4.11 Tiger, 32GB iPod Touch, Airport Extreme
i.shaun is offline   0 Reply With Quote
Old Jul 8, 2008, 09:14 PM   #4
GGJstudios
macrumors Westmere
 
Join Date: May 2008
Did you try the second link?
GGJstudios is offline   0 Reply With Quote
Old Jul 8, 2008, 09:30 PM   #5
i.shaun
Thread Starter
macrumors 6502a
 
Join Date: May 2008
Location: Canada
Send a message via AIM to i.shaun
sorry, the second link had a lot of info to look through.

I'm a bit nervous using Terminal while sitting on an Administrator account. Even though I'm not computer Illiterate -- I am Command-Line/programming Illiterate.

For some reason, when I tried to find out which process or program was accessing the files -- It was displaying finder. Finder always reboots faster than I can empty the trash (when I force quit/relaunch)

I also was getting errors stating "This is a directory." and stopping there.

or "data could not be read or written"

However, using the Terminal Command:

sudo rm -rf ~/.Trash/*

seems to have worked. I can just hope they do not return once again.

Thank you.


I never thought that it would have been such a hassle.
__________________

17" iMac, OS X 10.4.11 Tiger, 32GB iPod Touch, Airport Extreme
i.shaun is offline   0 Reply With Quote
Old Jul 8, 2008, 09:38 PM   #6
i.shaun
Thread Starter
macrumors 6502a
 
Join Date: May 2008
Location: Canada
Send a message via AIM to i.shaun
it was actually the

sudo rm -rf ~/.Trash

Command that did it. It Trashed my Trash Can. It says once I log Out, and back in, I will have another Trash, with proper permissions.
__________________

17" iMac, OS X 10.4.11 Tiger, 32GB iPod Touch, Airport Extreme
i.shaun is offline   0 Reply With Quote
Old Jul 9, 2008, 09:34 AM   #7
cptpower
macrumors regular
 
Join Date: Sep 2007
Location: Calgary, AB
I didn't read the other threads, but an option for this would've been to open up the terminal and type:

Code:
lsof | grep <insert_file_name>
This command will output what program is using the file that you're trying to delete. Then you can quit that particular program and you should be able to empty the trash without having to resort to anything severe like trashing your trash can.
__________________
MacBook Pro C2D 2.2Ghz
cptpower is offline   0 Reply With Quote
Old Jul 9, 2008, 09:42 AM   #8
merl1n
macrumors 65816
 
merl1n's Avatar
 
Join Date: Mar 2008
Location: New Jersey, USA
You could have booted in Safe Boot mode. That would have disabled the iTunes Helper in your login items. You then would have been able to empty the Trash.
__________________
Merl1n
MBP 15" 2.33GHZ, MacMini 2.0GHZ, PBG4 15" 1.67GHZ, PBG4 12" 1.5GHZ, iPodTouch 32GB
merl1n is offline   0 Reply With Quote
Old Jul 9, 2008, 10:17 AM   #9
GGJstudios
macrumors Westmere
 
Join Date: May 2008
Quote:
Originally Posted by cptpower View Post
I didn't read the other threads, but an option for this would've been to open up the terminal and type:

Code:
lsof | grep <insert_file_name>
This command will output what program is using the file that you're trying to delete. Then you can quit that particular program and you should be able to empty the trash without having to resort to anything severe like trashing your trash can.
Yes, that was in the other thread.
GGJstudios is offline   0 Reply With Quote
Old May 12, 2010, 10:12 PM   #10
Purple Dynasty
macrumors newbie
 
Join Date: May 2010
Thank you so much OP, this command solved my problem also.

sudo rm -rf ~/.Trash/*

If anyone is having a similar problem and hasn't tried this, do so immediately.
Purple Dynasty is offline   0 Reply With Quote
Old May 9, 2011, 04:19 PM   #11
neilcarlson1
macrumors newbie
 
Join Date: May 2011
Nothings Working Please Help!

None of this is working for me. I have some system files from a friends windows computer that my external auto backed up. The files are supposedly in use by finder. The files disappear after using the sudo terminal command and the trash icon/folder is empty but when i attempt to empty the trash they show back up. I cant copy them out of the trash. No form of command, option, shift, and delete works. I have no clue what to do and I about have my last hair pulled out. Any Ideas?
neilcarlson1 is offline   0 Reply With Quote
Old May 9, 2011, 04:22 PM   #12
GGJstudios
macrumors Westmere
 
Join Date: May 2008
Quote:
Originally Posted by neilcarlson1 View Post
None of this is working for me. I have some system files from a friends windows computer that my external auto backed up. The files are supposedly in use by finder. The files disappear after using the sudo terminal command and the trash icon/folder is empty but when i attempt to empty the trash they show back up. I cant copy them out of the trash. No form of command, option, shift, and delete works. I have no clue what to do and I about have my last hair pulled out. Any Ideas?
When you empty the trash, is the external drive still attached?
GGJstudios is offline   0 Reply With Quote
Old May 29, 2011, 10:55 PM   #13
andreik
macrumors newbie
 
Join Date: May 2011
You might wanna try changing the file's extension in the trash, I always change it to .rar and then I can delete it, never showed up again. Just had only 2 of these files.
andreik is offline   0 Reply With Quote
Old Dec 30, 2012, 02:57 PM   #14
edgarp
macrumors newbie
 
Join Date: Dec 2012
Quote:
Originally Posted by andreik View Post
You might wanna try changing the file's extension in the trash, I always change it to .rar and then I can delete it, never showed up again. Just had only 2 of these files.
Worked for me
edgarp is offline   0 Reply With Quote
Old Jan 18, 2013, 12:15 AM   #15
stuart2102
macrumors regular
 
Join Date: May 2011
I have problem on this too yesterday until now i cannot empty(trash) of my deleted files i already try one given suggestion here but it didnt work maybe is it wrong the way i do it? can any one give me step by step how to totally deleted my files that is in Trash? the is the message i receive when i try to empty my trash "The Finder canít complete the operation because some data in ďMan vs. Wild S1Ē canít be read or written.
(Error code -36)
" and i was wondering why this happen?
stuart2102 is offline   0 Reply With Quote
Old Jan 19, 2013, 10:14 AM   #16
merl1n
macrumors 65816
 
merl1n's Avatar
 
Join Date: Mar 2008
Location: New Jersey, USA
Quote:
Originally Posted by stuart2102 View Post
I have problem on this too yesterday until now i cannot empty(trash) of my deleted files i already try one given suggestion here but it didnt work maybe is it wrong the way i do it? can any one give me step by step how to totally deleted my files that is in Trash? the is the message i receive when i try to empty my trash "The Finder canít complete the operation because some data in ďMan vs. Wild S1Ē canít be read or written.
(Error code -36)
" and i was wondering why this happen?
The file in the trash looks to be corrupted and the Finder can't handle corrupted files.

You will need to launch the "Terminal Program" and type the following commands (listed in blue):

1. Type sudo ls -al .Trash

2. If you see a folder listed called 501 then type sudo rm -rf .Trash/501/*

3. If there is no 501 folder listed then just type sudo rm -rf .Trash/*

That should empty the trash. Now quit the Terminal app.

HTH.

Merl1n
__________________
Merl1n
MBP 15" 2.33GHZ, MacMini 2.0GHZ, PBG4 15" 1.67GHZ, PBG4 12" 1.5GHZ, iPodTouch 32GB
merl1n is offline   0 Reply With Quote
Old Jan 21, 2013, 12:58 AM   #17
stuart2102
macrumors regular
 
Join Date: May 2011
Quote:
Originally Posted by merl1n View Post
The file in the trash looks to be corrupted and the Finder can't handle corrupted files.

You will need to launch the "Terminal Program" and type the following commands (listed in blue):

1. Type sudo ls -al .Trash

2. If you see a folder listed called 501 then type sudo rm -rf .Trash/501/*

3. If there is no 501 folder listed then just type sudo rm -rf .Trash/*

That should empty the trash. Now quit the Terminal app.



HTH.

Merl1n

Still the same it didnt work, actually all that was given here as options i already tried it but seems doenst work on my imac
stuart2102 is offline   0 Reply With Quote
Old Jan 21, 2013, 01:08 AM   #18
justperry
macrumors 603
 
justperry's Avatar
 
Join Date: Aug 2007
Location: 7 Km South of an active upside down (boat) volcano.
Quote:
Originally Posted by stuart2102 View Post
Still the same it didnt work, actually all that was given here as options i already tried it but seems doenst work on my imac
In your original post you did not say wether or not the files in the trash were originally on the internal HD or an external source, I ask this because if it's an external and is for instance NTFS you should repair that disk before.

If it is the internal you should repair the disk with Disk Utilities but if those files belonged to the boot up Volume and you want to repair that one you have to boot from a different Volume or External volume.

If it is a newer machine you can also startup from internet Recovery and use Disk Utilities there.
justperry is offline   0 Reply With Quote
Old Jan 21, 2013, 01:19 AM   #19
stuart2102
macrumors regular
 
Join Date: May 2011
Quote:
Originally Posted by justperry View Post
In your original post you did not say wether or not the files in the trash were originally on the internal HD or an external source, I ask this because if it's an external and is for instance NTFS you should repair that disk before.

If it is the internal you should repair the disk with Disk Utilities but if those files belonged to the boot up Volume and you want to repair that one you have to boot from a different Volume or External volume.

If it is a newer machine you can also startup from internet Recovery and use Disk Utilities there.
Oh yeah sorry if i didnt mention if the files are coming from, uhmm...its coming from my external drive, i tried to repair but it says a message that it cannot repair anymore, uhmm i dont really get this "boot up Volume and you want to repair that one you have to boot from a different Volume or External volume" meaning?
stuart2102 is offline   0 Reply With Quote
Old Jan 21, 2013, 02:44 AM   #20
justperry
macrumors 603
 
justperry's Avatar
 
Join Date: Aug 2007
Location: 7 Km South of an active upside down (boat) volcano.
Quote:
Originally Posted by stuart2102 View Post
Oh yeah sorry if i didnt mention if the files are coming from, uhmm...its coming from my external drive, i tried to repair but it says a message that it cannot repair anymore, uhmm i dont really get this "boot up Volume and you want to repair that one you have to boot from a different Volume or External volume" meaning?
Is it formatted as NTFS!!!!!!!
I asked this before, if it is the Mac can NOT repair the disk, you need to do this on Windows or if you have windows installed in bootcamp try from there.
justperry is offline   0 Reply With Quote
Old Jan 21, 2013, 03:12 AM   #21
stuart2102
macrumors regular
 
Join Date: May 2011
Quote:
Originally Posted by justperry View Post
Is it formatted as NTFS!!!!!!!
I asked this before, if it is the Mac can NOT repair the disk, you need to do this on Windows or if you have windows installed in bootcamp try from there.
Oh im sorry i missed the line when u ask about it if it is ntfs of mac journal format, uhmm yes its ntfs, now i got it i wonder why i cant repair the disk thanks for it, uhmm can i raise question? uhmmm what happen why external HD i want to repair stop on working when i tried to make backup to my internal drive? it ejected by its own and i received message that says my hd was not properly ejected uhmmm im transfering files around 200gb
stuart2102 is offline   0 Reply With Quote
Old Jan 21, 2013, 03:57 AM   #22
justperry
macrumors 603
 
justperry's Avatar
 
Join Date: Aug 2007
Location: 7 Km South of an active upside down (boat) volcano.
Quote:
Originally Posted by stuart2102 View Post
Oh im sorry i missed the line when u ask about it if it is ntfs of mac journal format, uhmm yes its ntfs, now i got it i wonder why i cant repair the disk thanks for it, uhmm can i raise question? uhmmm what happen why external HD i want to repair stop on working when i tried to make backup to my internal drive? it ejected by its own and i received message that says my hd was not properly ejected uhmmm im transfering files around 200gb
The main reason your disk got damaged is because it was " hd was not properly ejected", this is probably not your fault but might be because you have a bad NTFS driver installed, if that is the case install a better NTFS driver like Paragon or, if you don't need the disk to be used on Windows erase the disk as HFS+.
justperry is offline   0 Reply With Quote
Old Jan 21, 2013, 07:24 PM   #23
stuart2102
macrumors regular
 
Join Date: May 2011
Quote:
Originally Posted by justperry View Post
The main reason your disk got damaged is because it was " hd was not properly ejected", this is probably not your fault but might be because you have a bad NTFS driver installed, if that is the case install a better NTFS driver like Paragon or, if you don't need the disk to be used on Windows erase the disk as HFS+.
Thank you so much...uhmm my trash now is empty i dont know what happen when i empty my trash again all the files from my external HD was sent there in the trash was gone whoaaah that was strange hehehe anyway thanks a lot guys...but still it puzzle me hehehe
stuart2102 is offline   0 Reply With Quote
Old Jan 21, 2013, 07:40 PM   #24
stuart2102
macrumors regular
 
Join Date: May 2011
aaahh still the same!!! huhuhu my files are still in my external HD and still i cant delete forever in my trash what happen to this, trash in mac gives me headache, i will try to delete my files in windows let see if still the same
stuart2102 is offline   0 Reply With Quote
Old Jan 21, 2013, 08:10 PM   #25
stuart2102
macrumors regular
 
Join Date: May 2011
Quote:
Originally Posted by McGl0othin View Post
I attempted the Terminal command from the Trash Bin instead of the desktop and get:Image

Yes i tried the terminal command for emptying my trash but stil doesnt work, i thought all are empty this morning, but when i put my exHD the files that i want to delete forever are still there, actuaally this files was not properly copyed in my exHD due to interuption like it eject my exHD with out any reason that is why, i dont know why or maybe my keyboard is not enough power to supply that is why it ejects in the middle of transfering batch files, now i tried to put my exHD at the back (usb) port of my imac and the transfering of data is smothly goin nice, my only concern now is how to delete forever those files that was intrupted.
stuart2102 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Can't empty trash mikethebook OS X 9 Nov 20, 2013 11:55 AM
Unable to empty trash eaglesteve OS X Mavericks (10.9) 12 Oct 29, 2013 11:25 AM
Can't empty trash or eject disk because Finder is "using" files? thegreatdivorce OS X 8 Jul 15, 2013 05:49 PM
Help getting files back that were delated and empty from trash cramazing iMac 9 Jul 2, 2013 04:16 PM
Trash will not empty Hetalia MacBook Pro 1 Feb 21, 2013 04:50 PM

Forum Jump

All times are GMT -5. The time now is 09:41 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC