The rules are:
Let's say you have the files:
- a single star (*) matches zero or more characters within a path name
- a double star (**) matches zero or more characters across directory levels
- a question mark (?) matches exactly one character within a path name
Let's say you have the files:
- bar.txt
- src/bar.c
- src/baz.c
- src/test/bartest.c
*.cmatches nothing (there are no .c files in the current directory)src/*.cmatches 2 and 3*/*.cmatches 2 and 3 (because * only matches one level)**/*.cmatches 2, 3, and 4 (because ** matches any number of levels)bar.*matches 1**/bar.*matches 1 and 2**/bar*.*matches 1, 2, and 4src/ba?.cmatches 2 and 3
No comments:
Post a Comment