summaryrefslogtreecommitdiff
path: root/usr.bin/stat
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2007-05-08 22:45:45 +0000
committerBrian Somers <brian@FreeBSD.org>2007-05-08 22:45:45 +0000
commit7204c415ef8a73daf916cbbbedd2b9aeda0d55ca (patch)
treea27c44d552f92c4bfc85c9242c97ac5095663e30 /usr.bin/stat
parent16caef30690b4b01aa47a29e49297b8fa92d4711 (diff)
Notes
Diffstat (limited to 'usr.bin/stat')
-rw-r--r--usr.bin/stat/stat.129
1 files changed, 27 insertions, 2 deletions
diff --git a/usr.bin/stat/stat.1 b/usr.bin/stat/stat.1
index d7ebb01c3997..8c260e25c124 100644
--- a/usr.bin/stat/stat.1
+++ b/usr.bin/stat/stat.1
@@ -36,7 +36,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 8, 2003
+.Dd April 27, 2007
.Dt STAT 1
.Os
.Sh NAME
@@ -455,7 +455,7 @@ $ echo $st_size $st_mtimespec
1148 1015432481
.Ed
.Pp
-In order to get a list of the kind of files including files pointed to if the
+In order to get a list of file types including files pointed to if the
file is a symbolic link, you could use the following format:
.Bd -literal -offset indent
$ stat -f "%N: %HT%SY" /tmp/*
@@ -497,6 +497,31 @@ Apr 25 11:47:00 2002 /tmp/blah
Apr 25 10:36:34 2002 /tmp/bar
Apr 24 16:47:35 2002 /tmp/foo
.Ed
+.Pp
+To display a file's modification time:
+.Bd -literal -offset indent
+\*[Gt] stat -f %m /tmp/foo
+1177697733
+.Ed
+.Pp
+To display the same modification time in a readable format:
+.Bd -literal -offset indent
+\*[Gt] stat -f %Sm /tmp/foo
+Apr 27 11:15:33 2007
+.Ed
+.Pp
+To display the same modification time in a readable and sortable format:
+.Bd -literal -offset indent
+\*[Gt] stat -f %Sm -t %Y%m%d%H%M%S /tmp/foo
+20070427111533
+.Ed
+.Pp
+To display the same in UTC:
+.Bd -literal -offset indent
+\*[Gt] sh
+$ TZ= stat -f %Sm -t %Y%m%d%H%M%S /tmp/foo
+20070427181533
+.Ed
.Sh SEE ALSO
.Xr file 1 ,
.Xr ls 1 ,