Le Wed, Aug 23, 2006 at 12:39:12PM +0200, Daniel C a écrit :
> 
> mais
> find -type f -name '*TOTO*' -exec rename 's/TOTO/titi/' {} \;
> renvoie "Can't rename ./unrepTOTO/unfichierTOTO 
> /unreptiti/unfichierTOTO: Aucun fichier ou répertoire de ce type" car 
> le rep unreptiti n'existe pas.

Dans ce cas, il faut ruser:

kunpuu|charles|$ rename -n 's#TOTO#titi#' repTOTO/fichTOTO 
repTOTO/fichTOTO renamed as reptiti/fichTOTO

kunpuu|charles|$ rename -n 's#(.*/?)TOTO#$1titi#' repTOTO/fichTOTO 
repTOTO/fichTOTO renamed as repTOTO/fichtiti

Bonne journée,

-- 
Charles Plessy
http://charles.plessy.org
Wako, Saitama, Japan


-- 
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.net/?DebianFrench   
Vous pouvez aussi ajouter le mot ``spam'' dans vos champs "From" et
"Reply-To:"

To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Répondre à