#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    London, England
    Posts
    262
    Rep Power
    14

    Permissions only to apply to files/directories


    Hello,

    Say I have a directory with many files and many sub-directories. Is it possible to do a chmod which will only apply to either the files or the directories?

    Cheers!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    To chmod just subdirs of /usr/local/src/ to 777 recursively:
    Code:
    find /usr/local/src -type d | xargs chmod 777
    For files that'd be -type f, and for symlinks -type l.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    London, England
    Posts
    262
    Rep Power
    14
    Perfect, thanks freebsd!

IMN logo majestic logo threadwatch logo seochat tools logo