- Forums
- Linux Systems
- How To Apply Chmod To Files Only Exclude Directories In Linux
this page will show you want command you will need to send into the linux/unix shell terminal to change permissions to either all the files only or directories only [8885], Last Updated: Sat May 18, 2024
wallpaperama
Wed Dec 31, 1969
0 Comments
157 Visits
i had a challenge today, i need to change mi images files to 644 but not my directories, so i was wondering how do i do this. its simple with this command
find . -type f -print0 | xargs -0 chmod 644
basically all its doing its looking for all the files (-f) and the output of that is to change the permissions to 644
simple right
how about only to directories?
find . -type d -print0 | xargs -0 chmod 644
see the difference?