Trashing files

Discussion in 'Mac Help/Tips' started by gaomay, Sep 22, 2002.

  1. gaomay macrumors regular

    Joined:
    May 28, 2002
    Location:
    Scotland, UK
    #1
    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.
     
  2. edesignuk Moderator emeritus

    edesignuk

    Joined:
    Mar 25, 2002
    Location:
    London, England
    #2
    Have you rebooted and then tried to trash the file?
     
  3. King Cobra macrumors 603

    Joined:
    Mar 2, 2002
    #3
    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.
     
  4. gaomay thread starter macrumors regular

    Joined:
    May 28, 2002
    Location:
    Scotland, UK
    #4
    tried all that

    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.
     
  5. evildead macrumors 65816

    evildead

    Joined:
    Jun 18, 2001
    Location:
    WestCost, USA
    #5
    try the Teminal

    try this in the terminal


    # cd /Users/YourUserName/Desktop

    # rm -rf TheNameOfTheFileYouWantToTrash


    but be careful... rm -rf is a very powerfull command
     
  6. edesignuk Moderator emeritus

    edesignuk

    Joined:
    Mar 25, 2002
    Location:
    London, England
    #6
    Re: tried all that

    Open terminal and type:

    cd desktop
    then
    sudo rm -f FileNameToDelete.xtn
    it will then prompt you for your password.
     
  7. edesignuk Moderator emeritus

    edesignuk

    Joined:
    Mar 25, 2002
    Location:
    London, England
    #7
    Looks like me and evildead posted the same thing at EXACTLY the same time! :p
     
  8. King Cobra macrumors 603

    Joined:
    Mar 2, 2002
    #8
    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
     
  9. evildead macrumors 65816

    evildead

    Joined:
    Jun 18, 2001
    Location:
    WestCost, USA
    #9
    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 :)
     
  10. gaomay thread starter macrumors regular

    Joined:
    May 28, 2002
    Location:
    Scotland, UK
    #10
    Thanks

    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.
     
  11. King Cobra macrumors 603

    Joined:
    Mar 2, 2002
    #11
    >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
     
  12. Wes macrumors 68020

    Wes

    Joined:
    Jun 22, 2001
    Location:
    London
    #12
    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
     
  13. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #13
    As a footnote to this...

    There is a handy GUI app called BatChmod, 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
     
  14. mc68k macrumors 68000

    mc68k

    Joined:
    Apr 16, 2002
    #14
    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.
     
  15. evildead macrumors 65816

    evildead

    Joined:
    Jun 18, 2001
    Location:
    WestCost, USA

Share This Page