(Courriels de diversion: <hallucinante@lendemain-desheritees.com> <execreraient@obstruees-simplifiez.com> <mulâtre@penetrez-plafonnee.com> <babas@troublait-ecologique.com> <grimages@salis-rentreras.com> <denombrerons@grassouillets-âpretes.com> <reconvertis@prud'hommes-rênes.com> <colosse@bosse-verbaliseras.com> <recourberait@ambitionneraient-irritent.com> <respections@chagrinerez-tempêteront.com> )
Le Mercredi 4 Décembre 2002 09:09, Michel Rodriguez a écrit :
> Je suis pas un pro de find mais l'option -exec devrait marcher:
>
> find . -type -f -exec xargs chmod a+r '{}' \;
>
> {} est remplace par le nom du fichier
trois réponses exactes, bravo et merci (juste, ci-dessus il faut supprimer
xargs).
find . -type -f -exec chmod a+r '{}' \;
quelques variantes dans l'usage des quotes ( '{}' avec ou sans ', ';' ou \;).
il y a un détail que je pige mal dans le man:
-exec command ;
Execute command; true if 0 status is returned. All following
arguments to find are taken to be arguments to the command until
an argument consisting of `;' is encountered. The string `{}'
is replaced by the current file name being processed
everywhere
it occurs in the arguments to the command, not just in arguments
where it is alone,
#??
as in some versions of find. Both of these
constructions might need to be escaped (with a `\') or quoted to
protect them from expansion by the shell. The command is exe-
cuted in the starting directory.
merci
jdd
--
<http://www.dodin.net>
Formation Linux débutants open
---------------------------------------------------------------------
Aide sur la liste: <URL:mailto:linux-31-help@CULTe.org>Le CULTe sur le web: <URL:http://www.CULTe.org/>