On 19 mai 08, at 20:14, Yves PETRONIN wrote:
> Effectivement la solution --exclude="**/Caches/" ...sans que je voie
> clairement comme la double astérisque opère....
cf. man rsync :
o the double asterisk pattern "**" will match slashes while a
single asterisk pattern
"*" will stop at slashes.
donc "**" correspond à un chemin de fichier pouvant contenir des "/",
alors que "*" s'arrête au premier "/" rencontré.
Dans ce cas, pour exclure "/Library/Caches/" on peut utiliser "*/
Caches/", mais pour exclure aussi "/User/toto/Library/Caches/" il faut
utiliser "**/Caches/"
J'avoue par contre que la suite me laisse perplexe :
o if the pattern contains a / (not counting a trailing /) or a
"**" then it is matched
against the full filename, including any leading directory.
If the pattern doesn't
contain a / or a "**", then it is matched only against the
final component of the
filename. Again, remember that the algorithm is applied
recursively so "full file-
name" can actually be any portion of a path below the starting
directory.
patpro_______________________________________________
archives :
http://listes.patpro.net/list/sshfr.fr.html
http://listes.patpro.net/mailman/listinfo/script_shell_fr