I copied a project directory to a portable hard disk, wiped my laptop and copied the project back, but now git reports loads of changes due to files that previously had 644 permission changing to 755.
I could recursively chmod all files and directories to 644, but then I get a load more changes in git (so looks like not everything was 644 previously). Is there any way to chmod only files that have 755 permissions?
Best Answer
The documentation for
find
(seeman find
) writes,So you can match files and change their permissions like this
Remove the
echo
when you are comfortable that it's showing you what you expect, and run it again.