Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Want To Confirm Chmod All Directories


    I just want to confirm that -> find . -type d -exec chmod 755 {} \; will chmod all directories current and lower will now be 755.

    Say directory scheme is,

    Home/Dir1/Dir2/Dir3/Dir4/Dir5, and I am in dircectory DIR3. If I run the statement above in Dir3, it should mean all directories DIR3/DIR4/DIR5 are all now 755 and DIR1 and DIR2 stay as before.

    Thanks JR

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA
    If you just run:
    find . -type d
    It will show you everything that will be matched when you actually run the -exec command.

  3. #3

    Thank you for the reply. But just want to confirm the directories it is going to chmod.


  4. $spacer_open
  5. #4
    What Cabhan is telling you is that everything returned by find . -type d will have performed on them whatever command you pass with the -exec arg in find . -type d -exec command {} \;

    in short, yes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts