Please someone assist me with chmod, I have the following file structure
-dir1
--file1
--file2
--dir1a
---file1a1
---file1a2
--dir1b
---file1b1
---file1b2
How do I chmod 655 to all files under dir1 and all subdir? So all files will have 655 permission and all dir will remain as they were.
Thank you
find . -type d -exec chmod 755 {} +
to change all directories to 755. – Kris Harper Aug 24 '11 at 13:02+
sign is expanded byfind
to the list of the file paths (or part of it, if too long). – enzotib Jan 28 '17 at 07:44--
indicates the end of command line options. This prevents a file starting with a hyphen from being interpreted as a command line option as it would come after the--
. – Tim Tisdall Mar 01 '19 at 20:43