Mac: Empty trash securely

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • french frank
    Administrator/Moderator
    • Feb 2007
    • 30256

    #16
    Slightly surprised others hadn't encountered this, as asking the various questions on Google brought up plenty of problems and a few remedies. Trash/USB drive now totally cleared by typing:

    "sudo rm -rf /Volumes/*/.Trashes" in the terminal, pressing Return and holding my hands over my eyes. It seems to have given the system a bit of a shock, blasting my desktop icons randomly about. But I now have 16GB of space on the flash drive.

    I started off deleting the trashed files individually by typing "rm" and dragging and dropping each one into the terminal (it didn't like folders), but as there were 44,000 files in Trash - all from the same flash drive - I thought something more drastic would be needed.
    It isn't given us to know those rare moments when people are wide open and the lightest touch can wither or heal. A moment too late and we can never reach them any more in this world.

    Comment

    • Dave2002
      Full Member
      • Dec 2010
      • 18010

      #17
      Originally posted by french frank View Post
      Slightly surprised others hadn't encountered this, as asking the various questions on Google brought up plenty of problems and a few remedies. Trash/USB drive now totally cleared by typing:

      "sudo rm -rf /Volumes/*/.Trashes" in the terminal, pressing Return and holding my hands over my eyes.
      Wow - that was brave!

      Did you know what you were doing?

      Sounds as though it has worked, and hopefully no collateral damage. I tend to be somewhat wary of commands with rm and * - which is likely to delete "anything" and or "everything", depending on the context, and also flags such as -f - which often means something like "force" and -r which often means "recursive" - though I'd have to check the manuals for that exact command. Actually - http://man7.org/linux/man-pages/man1/rm.1.html - looks like I was right.

      I think you got it right, but a small error might have led to a different outcome. However, you have backups .....

      Comment

      • Dave2002
        Full Member
        • Dec 2010
        • 18010

        #18
        As a more long winded alternative method, you could have adapted the scripts from here - http://www.engadget.com/2014/01/03/f...from-a-folder/ - which were topical not so long ago.

        I did try a fairly simple Applescript script recently in an attempt to time disk transfers, and I was surprised at how fast copying files was using the script. Doing the same thing manually would have taken considerably longer and more keystrokes, even for a relatively few files. However, the downside is getting the scripts sorted and working in the first place - and that applies to Unix or Linux scripts too.

        Comment

        • french frank
          Administrator/Moderator
          • Feb 2007
          • 30256

          #19
          Originally posted by Dave2002 View Post
          Wow - that was brave!

          Did you know what you were doing?
          Need you ask?

          I know what I wanted to happen - and it did. I shall certainly permanently delete more often, if only to make space available.
          It isn't given us to know those rare moments when people are wide open and the lightest touch can wither or heal. A moment too late and we can never reach them any more in this world.

          Comment

          • Dave2002
            Full Member
            • Dec 2010
            • 18010

            #20
            Originally posted by french frank View Post
            Need you ask?

            I know what I wanted to happen - and it did. I shall certainly permanently delete more often, if only to make space available.
            Glad it's all worked. Just take great care with any of those Unix commands involving rm and *

            I'm not even going to suggest a few which you absolutely should not do, in case you or anyone else reading this does them by mistake.

            Comment

            • Ferretfancy
              Full Member
              • Nov 2010
              • 3487

              #21
              Originally posted by french frank View Post
              Do other Mac users use this setting?

              I only discovered it when my 16GB memory stick wouldn't copy a folder over because there was 'not enough space', and emptying the trash appeared to be the solution.

              I don't know why the Mac was set to 'Empty trash securely' or why I hadn't had the problem before, but at about one file per second it was going to take about 2 hours to empty the trash. I turned off the setting and emptied the trash so that I could copy the folder on to the memory stick, as intended, and, yes, lo, the folder copied over instantly.

              I just wondered whether other people used the secure setting or not (presumably more regularly than I was doing).
              How strange! About an hour ago I used the secure empty trash for the first time! I had been re-arranging my iPhoto collection , getting rid of duplicates etc. before copying items to disc,and the trash was very full so I thought I'd try it.

              The same choice exists when erasing material from DVD RW discs, but I usually just do the shorter version, I suppose using the slower erase would be useful if you are worried by GCHQ!

              Comment

              Working...
              X