[tip]Find -exec tip

Using -exec command like below, need add escape character for semicolon that separated two commands in shell

1find directory/ -type d -exec chmod a+x {} \\;  

Feb 24, 2010 - update:

1find . -maxdepth 4 -type d  -name 'g-vxworks' 2>/dev/null -print

Jan. 7, 2024 - update: You might see No such file or directory when combining --exec rm to delete the found files.

You can add -depth option to mitigate the message.

1find deployment/g -depth -name 'asset.*' -type d -exec rm -rf {} \;