Re: chmod, chgrp and symlinks

From: Kasper Dupont (
Date: 02/04/03

From: Kasper Dupont <>
Date: Tue, 04 Feb 2003 09:26:19 +0100

Ramazan Jah-Far wrote:
> use
> find $dir -type f -name *.mp3 -exec chmod 640 {} \;

For faster execution you could make use of xargs:
find $dir -type f -name '*.mp3' -print0 | xargs -0 chmod 640

and to prevent chmod on hardlinks you could use:
find $dir -type f -links 1 -name '*.mp3' -print0 | xargs -0 chmod 640

Of course there might still be the problem with race
conditions. Any good ideas on how to deal with that?

Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use