Mailinglist Archive: opensuse (2532 mails)

< Previous Next >
Re: [opensuse] recursively chmod files only
  • From: Roger Oberholtzer <roger@xxxxxx>
  • Date: Fri, 02 May 2008 20:44:12 +0200
  • Message-id: <1209753852.8688.47.camel@xxxxxxxxxxxxxxxx>

On Fri, 2008-05-02 at 20:37 +0200, Istvan Gabor wrote:

I would like to recursively remove write permission of a
directory but to keep write and access permissions for the
How can I do this?

Impossible. You cannot both keep and remove write permissions on the
same thing. I suspect you mean something slightly different?

Remove write from files but keep it for directories. starting in the
current directory:

find . -type f -exec chmod a-w {} \;

It is how I would do it. Of course, there are probably other ways. If
you leave off the -exec stuff, it will print the files to will change
the permissions of.

Roger Oberholtzer

OPQ Systems / Ramböll RST
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23

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

< Previous Next >
Follow Ups