View Full Version : Trashing files
gaomay
Sep 22, 2002, 02:02 PM
I have file on my desktop (a cancelled download) which will not go into the trash because it is being used by another task right now. How can I get rid of this annoying file?
Thanks.
edesignuk
Sep 22, 2002, 02:06 PM
Have you rebooted and then tried to trash the file?
King Cobra
Sep 22, 2002, 03:24 PM
Whatever application you were using for the file needs to Quit. Then try deleting the file. I doubt a reboot is necessary. If you have to go farther, log out, then log back in.
gaomay
Sep 22, 2002, 04:49 PM
Tried rebooting several times and no change. Logging out also had no effect. I am led to believe that there are 3rd party utilities out there somehwere which can trash problem files - anyone know of any?
Thanks.
evildead
Sep 22, 2002, 04:57 PM
try this in the terminal
# cd /Users/YourUserName/Desktop
# rm -rf TheNameOfTheFileYouWantToTrash
but be careful... rm -rf is a very powerfull command
edesignuk
Sep 22, 2002, 04:57 PM
Originally posted by gaomay
Tried rebooting several times and no change. Logging out also had no effect. I am led to believe that there are 3rd party utilities out there somehwere which can trash problem files - anyone know of any?
Thanks.
Open terminal and type:
cd desktop
then
sudo rm -f FileNameToDelete.xtn
it will then prompt you for your password.
edesignuk
Sep 22, 2002, 04:58 PM
Looks like me and evildead posted the same thing at EXACTLY the same time! :p
King Cobra
Sep 22, 2002, 04:58 PM
I don't even think you even need to go to a third party software app. I suggest dragging the app to your desktop, logging in as root user, and deleting the file from there.
Here is how to do it:
ONE:
Drag the file(s) you wish to trash to your desktop.
TWO:
From the AppleCare knowledge docs:
" Important:
1. If you are not familiar with the meaning of "root user," you should read this entire article to get important precautionary information before using the root user. You must have an Admin user name and password to complete the steps below.
2. If you are using Mac OS X Server, root is already enabled by default. Advice contained in this article to disable root access when used infrequently does not apply to Mac OS X Server. It should remain enabled. For more information on related behavior, see technical document 106361: "Mac OS X, Mac OS X Server: Password Does Not Work as Expected After a Change"
Sections of this document:
I. Steps to enable the root user
II. How to log in as root
III. How to disable the root user
IV. About the root user
V. What is the root directory?
I. Steps to enable the root user
1. Click the Finder icon in the Dock.
2. Choose Go ⇒ Applications (Applications from the Go menu).
3. Open the Utilities folder.
4. Open the NetInfo Manager utility.
5. Click the lock in the NetInfo Manager window.
6. Enter the name and password of an Admin user, then click OK.
7. For Mac OS X 10.2: Choose Security ⇒ Enable Root User.
For Mac OS X 10.0 and 10.1: Choose Domain ⇒ Security ⇒ Enable Root User.
8. If you have not previously set a root password, an alert box may appear that says "NetInfo Error," indicating that the password is blank. Click OK.
9. Enter the root password you wish to use and click Set.
10. Enter the password again for verification and click Verify.
11. The root user is now enabled.
12. Click the lock again to prevent changes.
II. How to log in as root
For Mac OS X 10.2
1. If you are logged in to Mac OS X, choose ⇒ Log Out.
2. If you are logging in from a list of user names with pictures, click Other.
3. In the Name field, type: root
4. In the Password field, type the password you defined in the steps above.
For Mac OS X 10.0 to 10.1.5
After enabling the root user, you must log out from Mac OS X and log back in as the root user. Logging in to Mac OS X from a list of user names is the default behavior for later versions of Mac OS X. Logging in by typing your user name in a text entry field is the default behavior in earlier versions of Mac OS X. You can choose either method in the Login pane of the System Preferences application. The root user does not appear in the list, so you need the text entry option. If necessary, follow these steps to change the login method to text entry:
1. Choose ⇒ System Preferences.
2. Choose View ⇒ Login.
3. Click the Login Window tab.
4. Select the radio button for "Name and password entry fields."
Follow these steps to log in as root:
1. If you are logged in to Mac OS X, choose ⇒ Log Out.
2. In the Name field, type: root
3. In the Password field, type the password you defined in the steps above.
III. How to disable the root user
1. Open NetInfo Manager, located in the Utilities folder.
2. Click the lock.
3. Enter the name and password of an Admin user, then click OK.
4. For Mac OS X 10.2: Choose Security ⇒ Disable Root User.
For Mac OS X 10.0 and 10.1: Choose Domain ⇒ Security ⇒ Disable Root User.
IV. About the root user
The user named "root" is a special user in UNIX-style operating systems that has read and write privileges to all areas of the file system.
The root user should only be used for specific administration or monitoring tasks. After completing a task as the root user, you should log out of Mac OS X and log back in using a normal or Admin user account. You should disable root access if you do not use it often.
Warning
1. Only the owner of a computer or its designated administrator(s) should have Admin user status or the root password.
2. Any Admin user can become the root user or reset the root password.
3. A root password should be difficult to guess, containing both numbers and letters within the first eight characters.
4. A root user has the ability to read other users' files.
5. The root user has the ability to relocate or remove required system files and to introduce new files in locations that are protected from other users.
V. What is the root directory?
When reading technical documents, it helps to know that the term root is used in two distinct ways: The "root user" and the "root directory." The root directory is the highest directory level of a disk. The files and folders you see when you open (double-click) your hard disk icon are the contents of that disk's root directory.
A user's short name is also the name of his Home directory. The root user shares its name with its own Home directory, which is the first (or highest) level of the disk directory.
The Finder and the Terminal show different contents for the root directory. Some items in the root directory are made invisible when viewed in the Finder. This reduces visual clutter and enhances simplicity. Users familiar with UNIX command line may use the Terminal utility to view everything in a directory.
Notes
1. A directory is represented graphically as a folder. You may know your Home directory as your "Home folder." The terms "folder" and "directory" are generally interchangeable.
2. The root user does not appear in the Users pane of System Preferences."
THREE:
Once you have read the document in its entirety and understand it, log in as root user, locate the file again (should be in your home directory under desktop), and drag it to the Trash. Hit
Command - Option - Shift - Delete
It should work.
I must say, though, this thread is becoming quite popular quite rapidly. :p
evildead
Sep 22, 2002, 05:01 PM
Originally posted by verbose101
Looks like me and evildead posted the same thing at EXACTLY the same time! :p
haha.. I guess we did.
RE: Cobra
I guess you found all that root stuff after we had been talking about trashing files the past few days... Its all about passing on what you learn :)
gaomay
Sep 22, 2002, 05:02 PM
Thanks for all the suggestions folks. In the end I decided to play around with the terminal and I managed to get into the desktop folder and type rm filename which seemed to work.
Thanks again.
King Cobra
Sep 22, 2002, 05:05 PM
>RE: Cobra
>I guess you found all that root stuff after we had been talking about trashing files the past few days... Its all about passing on what you learn :)
Here Here! Tell it to the mountains, bigevil! :cool:
Now it's gaomay's turn. :p
Wes
Sep 22, 2002, 05:11 PM
Thanks guys! I've had this annoying file stuck on my desktop for weeks! The mac said it was always in use, but i have defeated it. :D
Rower_CPU
Sep 22, 2002, 07:34 PM
As a footnote to this...
There is a handy GUI app called BatChmod (http://versiontracker.com/moreinfo.fcgi?id=12057&db=mac), that allows you to change file permissions and even force empty the trash (aka. sudo rm -rf).
Logging in as root in the login window is a last resort. :p
mc68k
Sep 22, 2002, 10:26 PM
Originally posted by Rower_CPU
Logging in as root in the login window is a last resort. :p In addition to your comment, the only time to safely log in as root is preferably in single user mode. Or w/o a network connection.
Otherwise prefix all your superuser commands with sudo. Better security that way.
evildead
Sep 23, 2002, 05:29 PM
http://www.versiontracker.com/dyn/moreinfo/macosx/14884
This app does just what you want...
-evildead
vBulletin® v3.6.10, Copyright ©2000-2009, Jelsoft Enterprises Ltd.