Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Trash Conundrum

  • 16-02-2011 1:33pm
    #1
    Registered Users, Registered Users 2 Posts: 3,267 ✭✭✭


    Hi Guys

    I've got these 2 "files" in the Trash that simply won't delete. They're both aliases. I can't move them out of the trash either.

    Here's how it looks

    Screenshot2011-02-16at130757.png

    Get Info gives me the following location

    /Volumes/Windows/.Trashes/501

    so they're obviously somewhere on the dark side of the machine. However, going over there and emptying the "Wastebasket" has no effect.

    There's no real issue with these things, they don't prevent anything else being deleted, they're just annoying me and I'm losing sleep thinking about them ;)

    Any help appreciated.

    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 1,176 ✭✭✭vinnycoyne


    Have you tried rebooting and then emptying the Trash?


  • Moderators, Category Moderators, Arts Moderators, Entertainment Moderators, Technology & Internet Moderators Posts: 22,693 CMod ✭✭✭✭Sad Professor


    To force delete, hold the option key while emptying the trash.

    If that doesn't work, enter the following in Terminal. It will ask for you admin password.
    sudo rm -rf ~/.Trash/*


  • Registered Users, Registered Users 2 Posts: 6,790 ✭✭✭cornbb


    To force delete, hold the option key while emptying the trash.

    If that doesn't work, enter the following in Terminal. It will ask for you admin password.

    Or in this case:
    sudo rm -rf /Volumes/Windows/.Trashes/
    

    Take extreme care in using rm -rf - use only as shown unless you know what you're doing.


  • Registered Users, Registered Users 2 Posts: 863 ✭✭✭Simon201


    Surely you'll have to delete them while booting into Windows cos the Mac side can only read the bootcamp partition cant it?


  • Registered Users, Registered Users 2 Posts: 3,267 ✭✭✭DubTony


    To force delete, hold the option key while emptying the trash.

    If that doesn't work, enter the following in Terminal. It will ask for you admin password.
    sudo rm -rf ~/.Trash/*
    
    cornbb wrote: »
    Or in this case:
    sudo rm -rf /Volumes/Windows/.Trashes/
    

    Take extreme care in using rm -rf - use only as shown unless you know what you're doing.

    OK guys, thanks.

    Having avoided ever using terminal or anything like it since I bought my first Mac in 1996, I just want to be clear on something.

    Sad Professor's code contains a "~" before /.Trash
    cornbb's doesn't.

    I've copied and pasted the code provided into Terminal and when I press Return I get the warning that when the sudo command is used, there is a possibility that some important system files may be deleted and that I should check my typing. So just to be sure, and I don't doubt anyone's knowledge here, and because I'm pretty clueless, should there be a "~" in cornbb's code?

    Thanks for the help.

    Tony


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 6,790 ✭✭✭cornbb


    DubTony wrote: »
    OK guys, thanks.

    Having avoided ever using terminal or anything like it since I bought my first Mac in 1996, I just want to be clear on something.

    Sad Professor's code contains a "~" before /.Trash
    cornbb's doesn't.

    I've copied and pasted the code provided into Terminal and when I press Return I get the warning that when the sudo command is used, there is a possibility that some important system files may be deleted and that I should check my typing. So just to be sure, and I don't doubt anyone's knowledge here, and because I'm pretty clueless, should there be a "~" in cornbb's code?

    Thanks for the help.

    Tony

    The 'sudo' warning is in place because if you use sudo in conjunction with rm, you have the potential to do the sort of real damage that Finder won't allow you to do.

    To explain the various bits of these commands:

    'sudo' means run the command as a super-user, allowing you to affect any part of the filesystem and not just stuff in your home directory.

    'rm' means remove, this is a command to delete files.

    '-rf' are flags passed to rm - r means 'recursive', so anything in a subdirectory will also be deleted. 'f' means 'force' so files will be removed without further warning/prompting.


    To sum up, you can use both mine and Sad Professor's commands. They will both achieve the same thing, i.e. forcibly removing trash from different parts of the filesystem. But be careful to use them exactly as we typed them - if you only copied part of the path, or put a space in the wrong place, you could delete all or part of your filesystem.
    Surely you'll have to delete them while booting into Windows cos the Mac side can only read the bootcamp partition cant it?

    This might be true, I'm not sure about that meself :)


  • Registered Users, Registered Users 2 Posts: 194 ✭✭barryj


    DubTony wrote: »
    Sad Professor's code contains a "~" before /.Trash
    cornbb's doesn't.

    I've copied and pasted the code provided into Terminal and when I press Return I get the warning that when the sudo command is used, there is a possibility that some important system files may be deleted and that I should check my typing. So just to be sure, and I don't doubt anyone's

    Tony,

    You're right to be wary about running commands you don't understand, so I'll break down the commands for you so you have a better idea of what's happening.

    sudo: The 'sudo' command means, substitute user, do - and means that the commands that appear after this word, will be run as a different user to you. To protect you from mucking up, the operating system won't let ordinary users do some things - there is one supreme user on the system who is called 'root', this user can do anything - when you use the sudo command, you are asking the system to run the commands as this user rather than you. Typically, the system is configured to request your password before the command runs.

    rm -fr: 'rm' is the remove or delete file command. the two letters following the - are called flags or switches, and they modify how the command works. The 'f' part means force - by default 'rm' won't remove directories, so you need to force it to do this - again another level of protection. Teh 'r' part means recursive - which basically means apply this command to the file/directory mentioned and all files/directories contained in it.

    ~: is a shorthand notation meaning your home directory. Every user on the system has a home directory that contains all your own settings and files, destop, documents, downloads, etc. - if you have more users on your system, they each get their own directory. So when you use ~/.Trash/ - it means the folder/directory called .Trash that is located in your own home directory. Note the . (dot) at the start - this means the file is hidden, and won't show up under normal terminal commands unless you request to see hidden files. But the dot is still part of the name.

    When a filepath starts with '/': it means use an absolute path start at the very root level of the disk/volume. If you have no '/' at the beginning, it means the filepath is relative to where you currently are. When you open a terminal command, you are by default in your home directory. You can see this by typing the following command:

    pwd

    This means print working directory. And will display somehting like:

    /Users/myusername

    So to illustrate, the following are equivalent filepaths:

    /Users/myusername/myfile
    ~/myfile
    myfile (assuming your current directory is your home directory.

    * is a wildcard, which means all files - be VERY careful with this - there should be no space before it.

    Anyway, back to the commands:

    sudo rm -rf ~/.Trash/*

    means delete all files contained in the directory '.Trash' which is located in my directory.

    If you have a space before the *, it would mean delete the folder '.Trash' and everything in it AND delete all files in the current directory - which would not be a good idea.

    sudo rm -rf /Volumes/Windows/.Trashes/

    This command means delete the folder '/Volumes/Windows/.Trashes' and everything in it.

    As to which you should do - I'm not 100% as I don't run Windows, but if these are aliases in your trash file, then you want to delete the aliases rather than the originals, so I think:

    sudo rm -rf ~/.Trash/*

    Is the right one - it will empty your own Trash - and not do anything else.

    - barry


  • Registered Users, Registered Users 2 Posts: 315 ✭✭john__long


    Simon201 wrote: »
    Surely you'll have to delete them while booting into Windows cos the Mac side can only read the bootcamp partition cant it?


    It can edit too. Not much point in it otherwise!


  • Registered Users, Registered Users 2 Posts: 863 ✭✭✭Simon201


    Sorry yeah only NTFS formatted partion can't be edited from Mac side


  • Registered Users, Registered Users 2 Posts: 315 ✭✭john__long


    Right.

    I made an oversight.

    I have these additional plugins installed! MacFuse plugin. Adds additional HD format support to OS X. Read Write NTFS included.

    http://code.google.com/p/macfuse/

    e.g. for 10.4, should still work

    http://hints.macworld.com/article.php?story=20070220150856279


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 863 ✭✭✭Simon201


    Yeah that looks handy haven't heard of that before - I've occasionally wanted to write something to the bootcamp partition. Maybe if dubtony installed that it might help delete them files...


  • Registered Users, Registered Users 2 Posts: 3,267 ✭✭✭DubTony


    Jesus, lads, I didn't expect so much information. Thanks all very much. As a guy who hasn't a clue about code and "stuff" this is extremely interesting, and not at all as complicated as I would have imagined.

    Anyway, I used cornbb's command and put in my password, and got this result

    rm: /Volumes/Windows/.Trashes//501: Directory not empty
    rm: /Volumes/Windows/.Trashes/: Directory not empty

    I noticed that when I'd typed the password nothing appeared on the screen. Is that correct? I assumed it was so hit Return.

    I'm going to restart and empty the trash in Windows (although I believe it's empty already) and we'll see what we get. But as it stands those files are still there.


  • Registered Users, Registered Users 2 Posts: 6,790 ✭✭✭cornbb


    Slight alteration. Try:

    sudo rm -rf /Volumes/Windows/.Trashes/*

    and make sure you include the -rf bit

    Its possible that that may not fix it though, Windows and/or OS X may have set some weird bit in the file permissions that'll muck things up.


  • Registered Users, Registered Users 2 Posts: 229 ✭✭kramxw


    Works for me when stubborn file refuse to leave the bin, download here!


  • Registered Users, Registered Users 2 Posts: 3,267 ✭✭✭DubTony


    cornbb wrote: »
    Slight alteration. Try:

    sudo rm -rf /Volumes/Windows/.Trashes/*

    and make sure you include the -rf bit

    Its possible that that may not fix it though, Windows and/or OS X may have set some weird bit in the file permissions that'll muck things up.

    Thanks cornbb, I tried that, but there's no change. And the Windows trash seems to be empty so it's not like there's something obvious sitting there.

    There's no doubt what I have here is something unusual. I've never had a problem deleting stubborn files before these 2 popped up. The fact that they're aliases and with no file size, can't be removed from the Trash or deleted makes me think that it's definitely something out of the ordinary.

    The only advantage to all this is when I'm at the computer and reading through something or thinking about something I can continuously right click on the trash and hear that lovely scrunching sound whenever I like.

    @kramwx - I tried Trash It, but no joy there.

    Thanks again, to all of you.


Advertisement