Mailinglist Archive: opensuse (2532 mails)

< Previous Next >
Re: [opensuse] recursively chmod files only
  • From: Anders Johansson <ajh@xxxxxxxxxx>
  • Date: Fri, 2 May 2008 22:22:00 +0200
  • Message-id: <200805022222.00765.ajh@xxxxxxxxxx>
On Friday 02 May 2008 21:09:23 David Bolt wrote:
On Fri, 2 May 2008, Istvan Gabor wrote:-

I might have not made it clear. I want to remove the write
permissons of the directories and keep it for the files.

Then this should do the job:

find . -type d -print0 | xargs -0 chmod 555
^ ^
These are the number not the letter.

You could use:

find . -type d -exec chmod 555 '{}' \;

to do the same job. The only difference between them is that the former
starts up the minimum number of instances of chmod, where as the second
one won't complain if there are no directories to actually chmod.

Since the OP talked about removing permissions, and not stating what was there
in the first place, perhaps

find . -type d -exec chmod -w {} \;

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >