PDA

View Full Version : Cannot move to Trash because it cannot be deleted


mromano
05-21-2003, 08:19 PM
I'm running OS 10.2.6. My teen son downloaded an app and couldn't get it to open so he deleted it... or so he thought. It appears to be for OS 7-9. I have tried to delete the files I see but keep getting the message noted in my "subject line". Changed all permissions to me (admin)... booted into "Classic" and tried removing from there, but to no avail. Any other options available?

Marc

mervTormel
05-21-2003, 08:48 PM
hmm, i suspect the file is 'busy'

see this thread and determine if the file is busy...

http://forums.macosxhints.com/showthread.php?s=&threadid=11566&highlight=busy+AND+delete

bobw
05-22-2003, 09:30 AM
Open the terminal and type:

cd ~/.Trash
<hit return>

sudo rm -rf

put a space after the f and drag the item you want deleted to the terminal so that its path is automatically entered, then press return

give it your admin password and hit return

tlarkin
05-22-2003, 01:35 PM
that will work what bobw mentioned, however be careful using the sudo commands. If you do use them make sure you type in the command letter for letter word for word. That will give you root access to a command if you don't do it properly you could mess up your whole system.

boobie
05-22-2003, 02:11 PM
doesn't "rm -rf" work as well, without going into root? I always use "rm -rf" without any problem but i'm the only user so it might have something to do with that.

tlarkin
05-22-2003, 02:51 PM
Originally posted by boobie
doesn't "rm -rf" work as well, without going into root? I always use "rm -rf" without any problem but i'm the only user so it might have something to do with that.

That will work for all files you have read/write access to. The sudo (super user do) command allows you to modify files that belong to the root, which is basically the whole system folder. So yes rm -rf will work all all files that belong to your group, and the ones that the administrator can modify.

In this case you are already logged in as an administrator and do not have access to the files in the trash and cannot get rid of them. So you would have to use a sudo, to get root to get rid of the files.

mervTormel
05-22-2003, 03:10 PM
Originally posted by tlarkin
...The sudo (super user do) command allows you to modify files that belong to the root...

an important distinction:

the sudo/su facilities (substitute user) enable one to switch identity to another user, and gain the rights of said user, the default being user root.

the root user has full access to any files, not just the root user's. all files must be owned by someone. you and root aren't the only users on a rig...

users:

$ nidump passwd . | cut -d: -f1
nobody
root
daemon
unknown
smmsp
www
mysql
sshd
merv
...

the only file that can't be changed by the root user is one that has the system immutable flag set (see man chlfags). in this case, only super-user in single-user mode can turn off the system immutable bit.

mromano
05-22-2003, 07:02 PM
I have several folders that were created during his session. Can I drag all to the terminal window and delete all at once or do they need to be handled individually?

tlarkin
05-22-2003, 07:05 PM
you should drag each item one at a time to the terminal after using that command line.

If you would like to save time go to http://www.versiontracker.com and download a free program called cocktail. It has a "Force empty trash" option in the application and will force your trash to completely empty.

mromano
05-22-2003, 07:14 PM
I haven't been able to even move the files/folders to the trash, They all are in my "User's" folder at I am guessing (I'm new) the root level. In the Usre's folder I have each user folder plus the additional folders this app layed in.

mromano
05-22-2003, 07:20 PM
tlarkin

reading thru your post again... the folders may be removed by cocktail to clean up my son's deletion of the original program?

tlarkin
05-22-2003, 07:22 PM
Yes, cocktail will force everything you put in the trash to be deleted. Go HERE (http://www.versiontracker.com/mp/new_search.m?productDB=mac&mode=Quick&OS_Filter=MacOSX&search=cocktail) to download it. Its a freeware application.

If you cannot even move them to the trash, then the sudo rm -rf will work. You could alos log in as root and delete them that way. Hope that helps.

yellow
05-22-2003, 07:29 PM
tlarkin wrote: Its a freeware application.
Actially it's donation-ware, if you like it and use it, please donate to the designer!

tlarkin
05-22-2003, 08:28 PM
Originally posted by yellow
Actially it's donation-ware, if you like it and use it, please donate to the designer!

Oh, I did not know that, VT lists it as freeware.

serpico
05-23-2003, 12:25 AM
Cocktail was actually recommended to me this week and I love it. I used to use MacJanitor but this app does so much more and that Force Empty Trash feature is great. I remember those days of 10.0 when this happened alot and I had to reboot and then empty the trash! I can't believe how much OSX has changed.

mromano
05-23-2003, 08:18 PM
tlarkin... thanks for the point to Cocktail! Downloaded it... gave it a quick look-see... very straight forward and simple... and was able to delete the folders... painlessly. It also seems to have a number of other useful applications. I can see why serpico is impressed with it so much.