bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature request for chmod/chgrp/...


From: Jim Meyering
Subject: Re: feature request for chmod/chgrp/...
Date: Fri, 21 Feb 2003 11:21:36 +0100

Tjabo Kloppenburg <address@hidden> wrote:
> there's a feature I miss in chmod.
>
> I know the X flag for chmod, but I would like to set the permissions
> of files and directories (with subdirs) independently.
>
> Example: setting permissions of files to 660, of dirs to 664:
>   chmod -R . -f 660 -d 774
>
> I know the find utilitiy, but something like
>   find . -type f -exec chmod 660 {} \;
>   find . -type d -exec chmod 774 {} \;
> takes two lines. When called in a project tree with > 13000 files/dirs it 
> takes VERY long.

When there are many files/directories, use the combination of find and xargs.
There are examples here:

  http://www.gnu.org/software/fileutils/doc/faq/core-utils-faq.html

That will drastically reduce the number of
invocations of chmod and it'll run a lot faster.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]