Mailinglist Archive: opensuse (2532 mails)

< Previous Next >
Re: [opensuse] recursively chmod files only
  • From: Jan Engelhardt <jengelh@xxxxxxxxxx>
  • Date: Tue, 6 May 2008 09:52:11 +0200 (CEST)
  • Message-id: <alpine.LNX.1.10.0805060951520.16731@xxxxxxxxxxxxxxxxxxxxxxxxx>

On Friday 2008-05-02 21:09, 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.

The first one does not complain either if you add -r to xargs,
read the manpage.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >