-5

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 {} & \.

Aftab
  • 113
  • 4
  • Server Fault is a site for information technology professionals](http://serverfault.com/help/on-topic) -- as such we have certain professional expectations when people ask a question here, and one of those expectations is that your question shows a professional attitude and you at least looked at the manual. - Linux/UNIX systems come with online documentation; nearly everything (including the `man` command itself) is documented with [`man `](https://linux.die.net/man/1/man) although sometimes more the detailed [`info `](https://www.gnu.org/software/texinfo/) is used. – HBruijn Oct 29 '16 at 17:16

1 Answers1

3

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.

drookie
  • 8,625
  • 1
  • 19
  • 29