mirror of
https://github.com/opnsense/src.git
synced 2026-05-04 17:05:14 -04:00
Re-add -P option (for POSIX-like command line interface)
This commit is contained in:
parent
4451405fbd
commit
86ab37762e
2 changed files with 11 additions and 6 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue