]> pd.if.org Git - zpackage/blob - doc/zpm-stat.8
remove stray debug fprintf
[zpackage] / doc / zpm-stat.8
1 .TH zpm-stat 8 2019-02-14 "ZPM 0.3"
2 .SH NAME
3 zpm-stat \- run stat
4 .SH SYNOPSIS
5 .B zpm stat
6 [
7 .BI -f " format"
8 ]
9 [
10 .BI -t " timeformat"
11 ]
12 [
13 .B -l
14 ]
15 .RI [ path ...]
16 .SH DESCRIPTION
17 \fBzpm-stat\fR
18 prints information from stat(2) to stdout.  This program is needed because the
19 output from stat(1) is not specified by posix and thus can't be portably parsed
20 by shell scripts.  Thus zpm-stat provides a consistent interface for zpm
21 scripts to use.
22 .SH OPTIONS
23 .TP
24 \-f \fIformat\fR
25 Specify an output format.  Format strings are printf style strings,
26 where conversions are specified beginning with a % character, and %%
27 is used to output a literal %.  %z will output a zero byte.  \\n and \\t
28 escape sequences are also recognized.  Any other character preceeded
29 by a \\ will be output as is.
30 .IP
31 Available format conversions are:
32 y = mtime, s = file size, a = mode in octal, t = a file type string,
33 u = numeric user id, U = username, g = numeric group id, G = groupname,
34 and n = file name.
35 .TP
36 \-t \fIformat\fR
37 When outputting mtime, pass the given format to strftime.  The default
38 time format is "%s".
39 .TP
40 \-l
41 Use lstat instead of stat.  That is, don't follow symlinks.
42 .SH EXAMPLES
43 .TP
44 zpm stat /etc/passwd
45 print the mtime of /etc/passwd in decimal to stdout.
46 .SH EXIT STATUS
47 0 on success non zero on failure
48 .SH FILES
49 None.
50 .SH ENVIRONMENT
51 None.
52 .SH AUTHOR
53 Nathan Wagner
54 .SH SEE ALSO
55 .BR zpm (8)