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

Re: Renommage en masse



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



Reply to: