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

    [SOLVED] Use find with directories with spaces for stdout

    I'm trying to change the rights of a number of directories. But some of the directories have spaces in the names. It's only about the directories, not about the files in them.

    So far I came up with the next line:

    chmod g+rw `find * -type d`

    But I notice it cannot handle the dirs with spaces in the names.

    How do I handle these dirs aswell?
    Last edited by rexdejong; 08-08-2008 at 10:19 AM. Reason: found solution: find . -type d -exec chmod g+rw {} \;

Posting Permissions

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