Linux Find and Locate Cheat Sheet/Run chmod on matched files

Execute a command on each result.

Section: Actions and locate

Run chmod on matched files

bash
bash
find . -type f -name '*.sh' -exec chmod +x {} +

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Actions and locate
Delete old temporary files
Remove matching files directly from find.
OpenIn sheetbashsame section
Locate files using database
Search quickly using updatedb database.
OpenIn sheetbashsame section
Refresh locate database
Update file index used by locate.
OpenIn sheetbashsame section
Find file by exact name
Search recursively for a specific filename.
OpenIn sheetbash1 tag match
Find files larger than 100 MB
Search for large files using size filters.
OpenIn sheetbash1 tag match
Find world-writable files
Audit overly permissive files.
OpenIn sheetbash1 tag match