summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2000-09-25 16:24:22 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2000-09-25 16:24:22 +0000
commit86ab37762e394c218ab9876786005f57ea86bf0c (patch)
tree8bf0a1c0b914be88db7a79f7d9cb3e7834f6a402
parent4451405fbdbafd775e79f93032b4030e04f71d9c (diff)
Notes
-rw-r--r--usr.sbin/mtree/mtree.89
-rw-r--r--usr.sbin/mtree/mtree.c8
2 files changed, 11 insertions, 6 deletions
diff --git a/usr.sbin/mtree/mtree.8 b/usr.sbin/mtree/mtree.8
index 06e0eb847aed..fae66e887704 100644
--- a/usr.sbin/mtree/mtree.8
+++ b/usr.sbin/mtree/mtree.8
@@ -40,7 +40,7 @@
.Nd map a directory hierarchy
.Sh SYNOPSIS
.Nm mtree
-.Op Fl LUcdeinqrux
+.Op Fl LPUcdeinqrux
.Bk -words
.Op Fl f Ar spec
.Ek
@@ -71,9 +71,10 @@ missing from either the file hierarchy or the specification.
The options are as follows:
.Bl -tag -width flag
.It Fl L
-Follow all symbolic links in the file hierarchy (by default
-.Nm
-considers the symbolic link itself).
+Follow all symbolic links in the file hierarchy.
+.It Fl P
+Don't follow symbolic links in the file hierarchy, instead consider
+the symbolic link itself in any comparisons. This is the default.
.It Fl U
Modify the owner, group and permissions of existing files to match
the specification and create any missing directories or symbolic links.
diff --git a/usr.sbin/mtree/mtree.c b/usr.sbin/mtree/mtree.c
index 2aa4c512a360..331e669b18ec 100644
--- a/usr.sbin/mtree/mtree.c
+++ b/usr.sbin/mtree/mtree.c
@@ -77,7 +77,7 @@ main(argc, argv)
keys = KEYDEFAULT;
init_excludes();
- while ((ch = getopt(argc, argv, "cdef:iK:k:Lnp:qrs:UuxX:")) != -1)
+ while ((ch = getopt(argc, argv, "cdef:iK:k:LnPp:qrs:UuxX:")) != -1)
switch((char)ch) {
case 'c':
cflag = 1;
@@ -113,6 +113,10 @@ main(argc, argv)
case 'n':
nflag = 1;
break;
+ case 'P':
+ ftsoptions &= ~FTS_LOGICAL;
+ ftsoptions |= FTS_PHYSICAL;
+ break;
case 'p':
dir = optarg;
break;
@@ -170,7 +174,7 @@ static void
usage()
{
(void)fprintf(stderr,
-"usage: mtree [-LUcdeinqrux] [-f spec] [-K key] [-k key] [-p path] [-s seed]\n"
+"usage: mtree [-LPUcdeinqrux] [-f spec] [-K key] [-k key] [-p path] [-s seed]\n"
"\t[-X excludes]\n");
exit(1);
}