[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Permission change - recursive



Incoming from Curtis Vaughan:
> I just noticed that for an entire directory of files and folders, the 
> permissions are not really right.
> 
> Or maybe it doesn't matter.  I went ahead and changed all permission 
> recursively, but feel that permissions should be as follows: for all 
> files 660, whereas for all directories 770.  Has anyone written a 
> script that will drill through a directory and change all the 
> permissions in such a manner?

  find . -type f -exec chmod 660 {} \;
    "  "   "   d   "    "    770 "   "

If it fails on too many files, you'll have to use xargs instead of -exec


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)               http://www.spots.ab.ca/~keeling 
- -



Reply to: