Last updated on November 18th, 2022 at 10:53 am

Simple command to change the permission only on files recursively in linux

find . -type f -exec chmod 664 {} \;

The above command will first find only the files since we gave type as f and then change the permission of those files to 664.

For example if you run this command under
/var/www

All the files inside /var/www path will have the permission set to 664

Leave a Reply

Your email address will not be published. Required fields are marked *