8
3
I have a directory structure with files and directories and I like to assign permissions so all the files and directories have read-write permissions for the user and read permissions for the group and, additionally, execution permissions to the directory.
I would like to achieve something like that:
$ ls -l
total 16
-rw-r----- 1 daniel daniel 0 5月 23 16:20 1
-rw-r----- 1 daniel daniel 0 5月 23 16:20 2
-rw-r----- 1 daniel daniel 0 5月 23 16:20 3
-rw-r----- 1 daniel daniel 0 5月 23 16:20 4
-rw-r----- 1 daniel daniel 0 5月 23 16:20 5
drwxr-x--- 2 daniel daniel 4096 5月 23 16:00 a
drwxr-x--- 2 daniel daniel 4096 5月 23 16:00 b
drwxr-x--- 2 daniel daniel 4096 5月 23 15:59 c
drwxr-x--- 2 daniel daniel 4096 5月 23 15:59 d
Yeah, right, I could never adjust to the fact that nowadays many commands (cp, chmod...) have the -R flag... Once upon a time find was the only instrument to do this recursively. – MariusMatutiae – 2014-05-23T08:44:44.260