Unlocking multiple items in folder

Discussion in 'macOS' started by drayman86, Aug 11, 2008.

  1. drayman86 macrumors newbie

    Joined:
    Jun 8, 2007
    Location:
    Lansing, Michigan
    #1
    Is there a way to unlock multiple items in a folder at the same time? I've somehow got nearly 850 items in a Trash folder that I'm trying to delete, and they're all locked. It'll take 'till Doomsday to unlock them all individually.

    Thanks!
     
  2. TEG macrumors 604

    TEG

    Joined:
    Jan 21, 2002
    Location:
    Langley, Washington
    #2
    Pull them out into another folder. Then get info on the folder and change permissions to everyone for everything, then select, apply to enclosed files and folders.

    If that doesn't work, open terminal and CD to the folder in question. Once inside type 'chmod 777 *' that should do it.

    TEG
     
  3. jplan2008 macrumors regular

    Joined:
    Feb 15, 2008
    #3
    I think if you empty trash securely, you won't need to unlock them. (it will be a slow process but you don't have to do anything manually)
     
  4. drayman86 thread starter macrumors newbie

    Joined:
    Jun 8, 2007
    Location:
    Lansing, Michigan
    #4
    Thank you TEG and jplan2008.

    I'll try the secure empty trash first. It's been, like, forever since I attempted programming commands...back in 1990 I took a DOS class in undergrad, it's been that long.

    TEG, can you direct me to a spot on the forum that illustrates the basics of Terminal commands in case I need it?

    Thank you both again.
     
  5. drayman86 thread starter macrumors newbie

    Joined:
    Jun 8, 2007
    Location:
    Lansing, Michigan
    #5
    OK, the Secure Empty Trash didn't work. :mad:

    Can someone please help me with the proper Terminal commands that TEG recommends? :confused:
     
  6. TEG macrumors 604

    TEG

    Joined:
    Jan 21, 2002
    Location:
    Langley, Washington
    #6
    Just create a new folder in your Home Folder, copy the items into it. Then use Get Info to set the Mode.

    Or open Terminal and type each line

    cd foldername
    chmod 777 *

    Now close terminal and drag to trash and empty it.

    TEG
     
  7. drayman86 thread starter macrumors newbie

    Joined:
    Jun 8, 2007
    Location:
    Lansing, Michigan
    #7
    TEG, I appreciate your reply and patience.

    I CAN'T get these locked files out of the trash. If they're locked in the trash and dragged into the created folder, they COPY instead of move. If I attempt to drag the entire folder that contains the locked files out of the trash and onto the desktop, NOW I have the entire folder of locked files copied onto the dekstop AND the original in the trash.

    Even using the Edit Command/Cut/Paste won't get them there. When highlighting a locked file and clicking Edit, the Cut option is greyed out; only the copy option is available.

    Is this typical of locked files? I can't seem to get the Terminal to CD to the Trash.

    Yikes.....:confused:
     
  8. TEG macrumors 604

    TEG

    Joined:
    Jan 21, 2002
    Location:
    Langley, Washington
    #8
    Well, the Trash is actually .Trashes You may try the following..

    cd /
    cd .trashes

    See if that gets you in.

    TEG
     
  9. drayman86 thread starter macrumors newbie

    Joined:
    Jun 8, 2007
    Location:
    Lansing, Michigan
    #9
    Hi TEG:

    Looks like I made it into the Trash folder. Can you please guide me from here?

    Last login: Wed Aug 13 07:02:10 on ttyp1
    Welcome to Darwin!
    You have new mail.
    Heywood-jablowme:~ drayman86$ cd /
    Heywood-jablowme:/ drayman86$ cd .trashes
    Heywood-jablowme:/.trashes drayman86$

    I've previously tried to drag the folder in question (wojoinm) back to the desktop to attempt the maneuver you previously described, but as I said in a previous post the folder COPIES to the desktop instead of moving, so now I end up with TWO folders of locked files.

    Can I simply execute the chmod 777 * for the entire Trash folder? I can't seem to get Terminal to let me into the folders with the locked files:

    Last login: Wed Aug 13 07:02:10 on ttyp1
    Welcome to Darwin!
    You have new mail.
    Heywood-jablowme:~ drayman86$ cd /
    Heywood-jablowme:/ drayman86$ cd .trashes
    Heywood-jablowme:/.trashes drayman86$ cd wojoinm
    -bash: cd: wojoinm: No such file or directory
    Heywood-jablowme:/.trashes drayman86$

    Thanks again for you help and patience.
     
  10. TEG macrumors 604

    TEG

    Joined:
    Jan 21, 2002
    Location:
    Langley, Washington
    #10
    I would do

    chmod 777 foldername

    or do

    rm -r foldername

    TEG
     
  11. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #11
    Heh, something that may save you a lot of time: Hold down option while emptying the trash. Locked items will be deleted without any warnings.

    jW
     
  12. LtRammstein macrumors 6502a

    LtRammstein

    Joined:
    Jun 20, 2006
    Location:
    Denver, CO
    #12
    I think if the chmod doesn't work, you'll need to sudo it.

    sudo - super user do, it also requires the administrator's password.

    It's easy to mess stuff up with sudo, so use it with caution.

    I recommend doing this:

    Make sure you're in the trash folder. If the files in your trash are directories and those directories have subdirectories, you might need to change permissions on all of them. Easiest way to do this is:

    chmod -R 777 *

    What this does is changes the permissions of everything to 777, and will recursively do so for every item (even in subdirectories).

    Once that's done do:

    rm -rf foldername

    In this case, do not use *, this is because it will delete everything in the trash, and sometimes it can mess things up. The r is for recursive and f is for force. These are explained below.

    Whenever I'm working on a friend's Mac, and they have stubborn folders/files that need to be deleted, I do this:

    Make sure they are on the desktop, if I cannot click and drag, I use terminal for everything.

    cd <to where the file/folder is located>
    (optional) chmod -R 777 <file/folder name>
    sudo rm -rfv <file/folder name>

    So I locate the file, change the permissions and then to make sure I delete it, I sudo rm (remove) -rf (recursively and force) the file/folder. the force is used in addition to sudo to pretty much tell the Mac that I mean serious business. I use v (verbose) to allow me to see what files are being deleted. I'm a bit of a log nerd, so I like to see what it does.

    I'm sorry if I'm stepping on TEG's parade, or ranting to something that was completed; I just like it when people explain how they do things.
     
  13. drayman86 thread starter macrumors newbie

    Joined:
    Jun 8, 2007
    Location:
    Lansing, Michigan
    #13

    JOY ! ! !

    Thanks, jW. Thanks also to TEG & LtRammstein who took the time to help a Mac newbie. Karma to all.
     

Share This Page