mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-02 08:42:48 +00:00
Change description of file(1) following symlinks to the truth (namely,
by default, file(1) does not follow symlinks, the -L flag must be specified. PR: docs/8602 Submitted by: Kazuo Horikawa <k-horik@yk.rim.or.jp> Reviewed by: nik
This commit is contained in:
parent
17b1ea0341
commit
a53f20cc1e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45683
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)symlink.7 8.3 (Berkeley) 3/31/94
|
||||
.\" $Id: symlink.7,v 1.7 1997/06/19 01:07:05 jdp Exp $
|
||||
.\" $Id: symlink.7,v 1.8 1998/04/24 12:38:18 des Exp $
|
||||
.\"
|
||||
.Dd March 31, 1994
|
||||
.Dt SYMLINK 7
|
||||
@ -160,25 +160,7 @@ is included in this rule, while the command
|
||||
is not.
|
||||
(The latter is described in the third area, below.)
|
||||
.Pp
|
||||
If it is explicitly intended that the command operate on the symbolic
|
||||
link instead of following the symbolic link, e.g., it is desired that
|
||||
.Dq Li "file slink"
|
||||
display the type of file that
|
||||
.Dq Li slink
|
||||
is, whether it is a symbolic link or not, the
|
||||
.Fl h
|
||||
option should be used.
|
||||
In the above example,
|
||||
.Dq Li "file slink"
|
||||
would report the type of the file referenced by
|
||||
.Dq Li slink ,
|
||||
while
|
||||
.Dq Li "file -h slink"
|
||||
would report that
|
||||
.Dq Li slink
|
||||
was a symbolic link.
|
||||
.Pp
|
||||
There are three exceptions to this rule.
|
||||
There are four exceptions to this rule.
|
||||
The
|
||||
.Xr mv 1
|
||||
and
|
||||
@ -219,12 +201,23 @@ options affect its behavior even though it is not doing a walk of
|
||||
a file tree.)
|
||||
.Pp
|
||||
The
|
||||
.Xr file 1
|
||||
command is also an exception to this rule.
|
||||
The
|
||||
.Xr file 1
|
||||
command does not follow symbolic links named as argument by default.
|
||||
The
|
||||
.Xr file 1
|
||||
command does follow symbolic links named as argument if
|
||||
.Fl L
|
||||
option is specified.
|
||||
.Pp
|
||||
The
|
||||
.Bx 4.4
|
||||
system differs from historical 4BSD systems in that the
|
||||
.Nm chown ,
|
||||
.Nm chgrp
|
||||
.Nm chown
|
||||
and
|
||||
.Nm file
|
||||
.Nm chgrp
|
||||
commands follow symbolic links specified on the command line.
|
||||
.Ss Commands traversing a file tree.
|
||||
The following commands either optionally or always traverse file trees:
|
||||
@ -302,11 +295,6 @@ For example, the command
|
||||
.Dq Li "chown -HR user slink"
|
||||
will traverse the file hierarchy rooted in the file pointed to by
|
||||
.Dq Li slink .
|
||||
Note, the
|
||||
.Fl H
|
||||
is not the same as the previously discussed
|
||||
.Fl h
|
||||
flag.
|
||||
The
|
||||
.Fl H
|
||||
flag causes symbolic links specified on the command line to be
|
||||
|
Loading…
Reference in New Issue
Block a user