Commande - rsync

Exclusions

  • would exclude all filenames matching *.o

    bash --exclude "*.o"

  • would exclude a file in the base directory called foo

    bash --exclude "/foo"

  • would exclude any directory called foo.

    bash --exclude "foo/"

  • would exclude any file called bar two levels below a base directory called foo.

    bash --exclude "/foo/*/bar" `

  • would exclude any file called bar two or more levels below a base directory called foo.

    bash --exclude "/foo/**/bar"

Inclusions

  • would include all directories and C source files

    bash --include "*/" --include "*.c" --exclude "*"

  • would include only foo/bar.c (the foo/ directory must be explicitly included or it would be excluded by the “*”)

    bash --include "foo/" --include "foo/bar.c" --exclude "*"

Licence

logo creative common by-sa 3.0 Creative Commons Paternité – Partage à l’Identique 3.0 non transcrit