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

i.shaun

macrumors 6502a
Original poster
May 1, 2008
784
0
Canada
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?
 

i.shaun

macrumors 6502a
Original poster
May 1, 2008
784
0
Canada
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
 

i.shaun

macrumors 6502a
Original poster
May 1, 2008
784
0
Canada
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.
 

i.shaun

macrumors 6502a
Original poster
May 1, 2008
784
0
Canada
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.
 

cptpower

macrumors regular
Sep 10, 2007
205
0
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.
 

merl1n

macrumors 65816
Mar 30, 2008
1,095
0
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.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,545
943
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.
 

Purple Dynasty

macrumors newbie
May 12, 2010
1
0
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.
 

neilcarlson1

macrumors newbie
May 9, 2011
1
0
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?
 

GGJstudios

macrumors Westmere
May 16, 2008
44,545
943
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?
 

andreik

macrumors newbie
May 29, 2011
1
0
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.
 

stuart2102

macrumors regular
May 29, 2011
205
0
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?
 

merl1n

macrumors 65816
Mar 30, 2008
1,095
0
New Jersey, USA
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
 

stuart2102

macrumors regular
May 29, 2011
205
0
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
 

justperry

macrumors G5
Aug 10, 2007
12,557
9,750
I'm a rolling stone.
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.
 

stuart2102

macrumors regular
May 29, 2011
205
0
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?
 

justperry

macrumors G5
Aug 10, 2007
12,557
9,750
I'm a rolling stone.
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.
 

stuart2102

macrumors regular
May 29, 2011
205
0
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
 

justperry

macrumors G5
Aug 10, 2007
12,557
9,750
I'm a rolling stone.
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+.
 

stuart2102

macrumors regular
May 29, 2011
205
0
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

macrumors regular
May 29, 2011
205
0
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

macrumors regular
May 29, 2011
205
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.