Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialFilipe Pacheco
Full Stack JavaScript Techdegree Student 21,416 PointsPermissions for multiples files
Once I came across a situation where I needed to change the file permissions for all the files inside a directory. I used a software that helped me doing that. Is that possible to do it through the terminal?
1 Answer
Joel Bardsley
31,249 PointsHi Filipe, if you want to target just files (not folders) in a certain directory and change the chmod to 644 for example, you can do:
find /path/to/your/folder -type f -exec chmod 644 {} \;
Alternatively, if for some reason you want all files and all subdirectories to be chmod 755 for example, this would work:
chmod 755 -R /path/to/your/folder
Filipe Pacheco
Full Stack JavaScript Techdegree Student 21,416 PointsFilipe Pacheco
Full Stack JavaScript Techdegree Student 21,416 PointsThank you, Joel.