Lets say you want to change file permissions of all the files that you own in a particular directory. In such case, find command can be used to get all files for a particular user and chmod command can be used to change the file permissions. Following is the command:

find path -user username -exec chmod permission ‘{}” \;

eg: find . -user badal -exec chmod 2775 ‘{}’ \;

Thanks

Advertisements

Rate this:

Share this:

Like this:

LikeLoading...

Related

About Badal Chowdhary

I am a Software Engineer by profession. I have done SCJP and SCWCD certifications. Like working on cutting edge technologies and frameworks. Driven by challenges and fascinated by technology. I love playing and watching sports: Cricket, Ping Pong, Tennis, Badminton, Racket Ball and Gym.