There is command that change the folder permission for all subfolders
find . -type d -exec chmod 755 {} \;
I understand d
is for directory and chmod 755
to make all directory as 755
I want to know what is the meaning of {}
& \
.
There is command that change the folder permission for all subfolders
find . -type d -exec chmod 755 {} \;
I understand d
is for directory and chmod 755
to make all directory as 755
I want to know what is the meaning of {}
& \
.
Reading manuals for another person: $50/hr.
{}
is a placeholder and \
is an escape symbol.
man find
:
-exec utility [argument ...] ;
True if the program named utility returns a zero value as its exit status. Optional arguments may be passed to the utility. The expression must be terminated by a semicolon (“;”). If you invoke find from a shell you may need to quote the semicolon if the shell would otherwise treat it as a control operator. If the string “{}” appears anywhere in the utility name or the arguments it is replaced by the pathname of the current file. Utility will be executed from the directory from which find was executed. Utility and arguments are not subject to the further expansion of shell patterns and constructs.