1.\" $NetBSD: stat.1,v 1.5 2002/07/08 18:48:42 atatat Exp $ |
2.\" 3.\" Copyright (c) 2002 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Andrew Brown and Jan Schaumann. 8.\" 9.\" Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35.\" POSSIBILITY OF SUCH DAMAGE. 36.\" |
37.\" $FreeBSD: head/usr.bin/stat/stat.1 101773 2002-08-13 08:23:49Z dougb $ |
38.\" 39.Dd April 24, 2002 40.Dt STAT 1 41.Os 42.Sh NAME |
43.Nm stat , 44.Nm readlink |
45.Nd display file status 46.Sh SYNOPSIS 47.Nm 48.Op Fl FLn 49.Oo 50.Fl f Ar format | 51.Fl l | |
52.Fl q | |
53.Fl r | 54.Fl s | 55.Fl x 56.Oc 57.Op Fl t Ar timefmt 58.Op Ar |
59.Nm readlink 60.Op Fl n 61.Op Ar |
62.Sh DESCRIPTION 63The 64.Nm 65utility displays information about the file pointed to by 66.Ar file . 67Read, write or execute permissions of the named file are not required, but 68all directories listed in the path name leading to the file must be 69searchable. If no argument is given, 70.Nm 71displays information about the file descriptor for standard input. 72.Pp |
73When invoked as 74.Nm readlink , 75only the target of the symbolic link is printed. If the given argument 76is not a symbolic link, 77.Nm readlink 78will print nothing and exit with an error. 79.Pp |
80The information displayed is obtained by calling 81.Xr lstat 2 82with the given argument and evaluating the returned structure. 83.Pp 84The options are as follows: 85.Bl -tag -width Ds 86.It Fl F 87As in --- 21 unchanged lines hidden (view full) --- 109Do not force a newline to appear at the end of each piece of output. 110.It Fl f Ar format 111Display information using the specified format. See the FORMATS section 112for a description of valid formats. 113.It Fl l 114Display output in 115.Ic ls Fl lT 116format. |
117.It Fl q 118Suppress failure messages from 119.Xr stat 2 . |
120.It Fl r 121Display raw information. That is, for all the fields in the stat-structure, 122display the raw, numerical value (for example, times in seconds since the 123epoch, etc.) 124.It Fl s 125Display information in ``shell output'', suitable for initializing variables. 126.It Fl x 127Display information in a more verbose way as known from some Linux --- 322 unchanged lines hidden --- |