Encode literal global characters in files. Otherwise the results of updating a directory using the resulting spec will be surprising. See http://svnweb.freebsd.org/base/head/usr.sbin/mtree/test/test00.sh for test cases. Index: spec.c =================================================================== --- spec.c (revision 240788) +++ spec.c (revision 240789) @@ -415,7 +415,8 @@ char * vispath(const char *path) { - const char extra[] = { ' ', '\t', '\n', '\\', '#', '\0' }; + const char extra[] = { ' ', '\t', '\n', '\\', '#', '*', '?', '[', + '#', '\0' }; static char pathbuf[4*MAXPATHLEN + 1]; strsvis(pathbuf, path, VIS_CSTYLE, extra);