Unlock a folder full of files

Discussion in 'OS X Mountain Lion (10.8)' started by opusthe2nd, Oct 30, 2012.

  1. opusthe2nd macrumors 6502

    opusthe2nd

    Joined:
    Sep 5, 2005
    #1
    I manually imported files from an old TM backup. They are all locked, I want to unlock them so I can randomly delete them. How do I correct this issue?? Folders and sub-folders in one fell swoop.
     
  2. mrapplegate macrumors 68030

    Joined:
    Feb 26, 2011
    Location:
    Cincinnati, OH
    #2
    You can google it :rolleyes:

    In terminal type

    chflags -R nouchg /PATH/TO/DIRECTORY/WITH/LOCKED/FILES/
     
  3. opusthe2nd thread starter macrumors 6502

    opusthe2nd

    Joined:
    Sep 5, 2005
    #3
    I did Google it and got the same thing you said. I proceeded to do it and it said no go. I since tried to delete them and it DOES work, regardless of the error it spit out at me.
     
  4. mrapplegate macrumors 68030

    Joined:
    Feb 26, 2011
    Location:
    Cincinnati, OH
    #4
    I'm not sure of the error you got but that is the unix command to unlock files recursively.
     
  5. opusthe2nd thread starter macrumors 6502

    opusthe2nd

    Joined:
    Sep 5, 2005
    #5
    As I thought too.
     
  6. mrapplegate macrumors 68030

    Joined:
    Feb 26, 2011
    Location:
    Cincinnati, OH
    #6
    Scratch that, I just tested it in 10.8.2

    I can lock a set of files in a fodder using
    chflags -R uchg /Users/thor/Desktop/Test

    but can't unlock using
    chflags -R nouchg /Users/thor/Desktop/Test

    Strange.
     
  7. opusthe2nd thread starter macrumors 6502

    opusthe2nd

    Joined:
    Sep 5, 2005
    #7
    Thats what I thought, I did it and I can now delete. Who knows!
     
  8. mrapplegate macrumors 68030

    Joined:
    Feb 26, 2011
    Location:
    Cincinnati, OH
    #8
    Glad it's working.
     
  9. opusthe2nd thread starter macrumors 6502

    opusthe2nd

    Joined:
    Sep 5, 2005
    #9
    Sorry yours isnt. ;)
     
  10. mrapplegate macrumors 68030

    Joined:
    Feb 26, 2011
    Location:
    Cincinnati, OH
    #10
    Mine was just a test after you said the command did not work. I did not expect it not to work, lol after all it's unix. The command is valid. Maybe it will just work later. Thankfully I don't need it to work haha :)
     
  11. opusthe2nd thread starter macrumors 6502

    opusthe2nd

    Joined:
    Sep 5, 2005
    #11
    FreeBSD user for years, thats why I was puzzled.
     
  12. mrapplegate macrumors 68030

    Joined:
    Feb 26, 2011
    Location:
    Cincinnati, OH
    #12
    Yes, it's a mystery. I usually don't deal with locked files, but have in the past. I can't explain it.
     
  13. DeepIn2U macrumors 68040

    DeepIn2U

    Joined:
    May 30, 2002
    Location:
    Toronto, Ontario, Canada
    #13
    Unlock All Files in Folder OSX 10.8 - Solution

    I was digging around and the command in terminal you need to use is


    chflags -R nouchg *

    Thus in "mrapplegate" issue ... the solution is
    chflags -R nouchg * /Users/thor/Desktop/Test

    (the asterisks was missing).
    Solution Find on: http://www.mehtanirav.com/2009/04/16/recursively-unlock-files-on-mac-os-x/

     
  14. austenl macrumors newbie

    Joined:
    Sep 14, 2014

Share This Page