1

Let's assume that I have this folder structure:

|-Home    
 |-Subdir
  |-Subsubdir
 |-Subdir

Each directory includes a bunch of files.

Now I want to apply the following permissions:

  • All directories - 750
  • All files in these directories - 644

Is it possible to do it in one go?

luqo33
  • 347
  • 1
  • 3
  • 8

1 Answers1

3

I could do it in 2 passes

find /path/to/Home -type d -exec chmod 750 {} \+
find /path/to/Home -type f -exec chmod 744 {} \+

Why do you need to do it in 'one go' ?

user9517
  • 115,471
  • 20
  • 215
  • 297
  • This is what I was looking for. Of course it does not have to be in "one go" :). Thank you. – luqo33 Sep 26 '15 at 21:47