title: How to change all folders and files permessions base on folder name?
body: <p>For exemple we have  folders named with permission numbers 555 or 700 or 777... how can we take the file name and change all the subfolders and files with permissions based on the folder name ?
  so if we apply it on the folder 555 the current folder and everything inside will have permission as 555
  i've tried</p>
  <pre><code>find . -name &quot;[0-9][0-9][0-9]&quot; -type d | xargs chmod -Rv [0-9][0-9][0-9]
  </code></pre>
  <p>but it only takes the first folder name and apply it on everything it i want it to treat each folder name ( named withe permission) seperately
  thank you.</p>