Change permissions in bulk on certain files

Discussion in 'macOS' started by ManhattanPrjct, Jun 30, 2010.

  1. ManhattanPrjct macrumors 6502

    Joined:
    Oct 6, 2008
    #1
    For some reason, a number of files on my hard drive are "read" instead of "read/write." I am not sure how this happened, but I wanted to know if there's a quick way to change the permissions on about 1000 files without changing each one one-by-one. You would think clicking the folder and changing it there would solve this issue...
     
  2. belvdr macrumors 603

    Joined:
    Aug 15, 2005
    Location:
    No longer logging into MR
    #2
    If the files are in one folder, open Terminal:

    Code:
    cd /path/to/files
    Code:
    chmod u+w <file list>
    where <file list> can be a wildcard, such as *.* for all files, including hidden ones. This adds the write privilege to the owner of the files.
     
  3. ManhattanPrjct thread starter macrumors 6502

    Joined:
    Oct 6, 2008
    #3
    What if they are in multiple folders, under the same tree?
     
  4. belvdr macrumors 603

    Joined:
    Aug 15, 2005
    Location:
    No longer logging into MR
    #4
    If you want to ensure your user has write permissions on all files:

    Code:
    find /path/to/files -type f -exec chmod u+w {} \;
     
  5. ManhattanPrjct thread starter macrumors 6502

    Joined:
    Oct 6, 2008
    #5
    Is that \; a tentative winky face or should that actually be typed?
     

Share This Page