Tuesday, 8 September 2015

How to change the file/directory permission using find command?

The find command is used to locate files on a Unix or Linux system. You can search for files by name, owner, group, type, permissions, date, and other criteria.

You can change the permissions of all files and directories using the following commands.

For Files:

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

For directories:

find . -type d -exec chmod 755 {} \;

No comments:

Post a Comment