Add -q. This will cause the warning messages about missing directories to not be printed. Obtained from: OpenBSD Index: mtree.8 =================================================================== --- mtree.8 (revision 240748) +++ mtree.8 (revision 240749) @@ -229,6 +229,12 @@ Use the file hierarchy rooted in .Ar path , instead of the current directory. +.It Fl q +Quiet mode. +Do not complain when a +.Dq missing +directory cannot be created because it already exists. +This occurs when the directory is a symbolic link. .It Fl R Ar keywords Remove the specified (whitespace or comma separated) keywords from the current set of keywords. Index: verify.c =================================================================== --- verify.c (revision 240748) +++ verify.c (revision 240749) @@ -175,8 +175,16 @@ if (p->type != F_DIR && (dflag || p->flags & F_VISIT)) continue; strcpy(tail, p->name); - if (!(p->flags & F_VISIT)) - printf("missing: %s", path); + if (!(p->flags & F_VISIT)) { + /* Don't print missing message if file exists as a + symbolic link and the -q flag is set. */ + struct stat statbuf; + + if (qflag && stat(path, &statbuf) == 0) + p->flags |= F_VISIT; + else + (void)printf("%s missing", path); + } switch (p->type) { case F_BLOCK: case F_CHAR: Index: extern.h =================================================================== --- extern.h (revision 240748) +++ extern.h (revision 240749) @@ -70,7 +70,7 @@ int verify(void); extern int dflag, eflag, iflag, lflag, mflag, - nflag, rflag, sflag, tflag, uflag; + nflag, qflag, rflag, sflag, tflag, uflag; extern int mtree_Mflag, mtree_Sflag, mtree_Wflag; extern size_t mtree_lineno; extern u_int32_t crc_total; Index: mtree.c =================================================================== --- mtree.c (revision 240748) +++ mtree.c (revision 240749) @@ -60,7 +60,7 @@ int ftsoptions = FTS_PHYSICAL; int cflag, Cflag, dflag, Dflag, eflag, iflag, lflag, mflag, - nflag, rflag, sflag, tflag, uflag, Uflag; + nflag, qflag, rflag, sflag, tflag, uflag, Uflag; char fullpath[MAXPATHLEN]; __dead2 static void usage(void); @@ -77,7 +77,7 @@ init_excludes(); while ((ch = getopt(argc, argv, - "cCdDeE:f:I:ik:K:lLmMnN:p:PrR:s:StuUWxX:")) + "cCdDeE:f:I:ik:K:lLmMnN:p:PqrR:s:StuUWxX:")) != -1) { switch((char)ch) { case 'c': @@ -148,6 +148,9 @@ ftsoptions &= ~FTS_LOGICAL; ftsoptions |= FTS_PHYSICAL; break; + case 'q': + qflag = 1; + break; case 'r': rflag = 1; break;