Mailinglist Archive: opensuse (2532 mails)

< Previous Next >
Re: [opensuse] recursively chmod files only
  • From: David Bolt <bcrafhfr@xxxxxxxxxx>
  • Date: Fri, 2 May 2008 20:09:23 +0100
  • Message-id: <ZcnUc5xjb2GIFwpl@xxxxxxxxxxxxxxxxxxx>
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.


Regards,
David Bolt

--
Team Acorn: http://www.distributed.net/ OGR-P2 @ ~100Mnodes RC5-72 @ ~15Mkeys
SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0b1
SUSE 10.1 64bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit
RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC | RISC OS 3.11
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >