How to change the permissions of files in a directory recursively
Smoot Carl-Mitchell
smoot at tic.com
Tue Apr 25 04:15:00 UTC 2017
On Mon, 2017-04-24 at 22:38 -0400, Rashkae wrote:
> On 17-04-24 08:48 PM, Smoot Carl-Mitchell wrote:
>
> >
> >
> > For a deep directory you can do:
> >
> > find <dir> -type f -perm 766
> >
> > which recursively finds all the regular files and changes their
> > mode in
> > the directory tree.
> >
> > Smoot
> >
>
> Umm, what? -perm option to find searches for permissions, it
> doesn't
> change anything.
You are correct. Should be something like:
find <dir> -type f -exec chmod 766 {} \;
or
find <dir> -type f -print | xargs chmod 766
--
Smoot Carl-Mitchell
System/Network Architect
voice: +1 480 922-7313
cell: +1 602 421-9005
smoot at tic.com
More information about the ubuntu-users
mailing list