• # re

    Posté par . En réponse au message Rsync et l'exclude. Évalué à 2.

    Extrait de la page de man de rsync:


    o if the pattern starts with a / then it is anchored to a particu-
    lar spot in the hierarchy of files, otherwise it is matched
    against the end of the pathname. This is similar to a leading ^
    in regular expressions. Thus "/foo" would match a file called
    "foo" at either the "root of the transfer" (for a global rule)
    or in the merge-file's directory (for a per-directory rule). An
    unqualified "foo" would match any file or directory named "foo"
    anywhere in the tree because the algorithm is applied recur-
    sively from the top down; it behaves as if each path component
    gets a turn at being the end of the file name. Even the unan-
    chored "sub/foo" would match at any point in the hierarchy where
    a "foo" was found within a directory named "sub". See the sec-
    tion on ANCHORING INCLUDE/EXCLUDE PATTERNS for a full discussion
    of how to specify a pattern that matches at the root of the
    transfer.

    o if the pattern ends with a / then it will only match a direc-
    tory, not a file, link, or device.


    Donc en gros à ta place je mettrai /home/user2/dossier/ avec un / à la fin.