I am trying to figure out what the following command would do. I extracted it from a Linux shell script and when I enter it goes to a prompt (>). But I cannot figure out what to enter in this prompt.
find ~/dev/tools/flex-4.5.0.20967 -type d -exec chmod o+rx '{}' \
I know the purpose of the find command here. It is searching for the specified directory, checking whether it is indeed a directory and executing the chmod command on that directory. What I cannot figure out is the format of the chmod command here.
I checked man page of chmod but cannot determine the functionality of the above chmod format.
Thanks.
Check the man page for
find. the{} \;is specific to the-execflag forfindThe > prompt appeared because you missed a ‘;’ at the end of ‘\;’
The command finds all sub-directories under
~/dev/tools/flex-4.5.0.20967. without the-type dit will also include files under the folder.The
-exec my_command my_args1 my_args2 '{}' \;part specifies for each matched result by find , execute the commandmy_commandas :The
{}is replaced with the matched result , in this case a directory, the\;is to indicate the termination of arguments formy_command