commit: 5592fa09fe6c966dc7772864dece7b750f216a12
parent 88c3c68352b40cc0c669cb838219417c1ad80a1e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Wed, 2 Jul 2025 21:14:47 +0200
oasis 78a242103f
Diffstat:
11 files changed, 158 insertions(+), 114 deletions(-)
diff --git a/bin/df b/bin/df
Binary files differ.
diff --git a/bin/head b/bin/head
Binary files differ.
diff --git a/bin/install b/bin/install
Binary files differ.
diff --git a/bin/uname b/bin/uname
Binary files differ.
diff --git a/share/man/man1/chown.1 b/share/man/man1/chown.1
@@ -108,5 +108,9 @@ The
and
.Fl -reference
options are extensions, also present in GNU coreutils.
+.Sh HISTORY
+Support for
+.Fl -reference
+was added in utils-std 0.0.5.
.Sh AUTHORS
.An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me
diff --git a/share/man/man1/date.1 b/share/man/man1/date.1
@@ -27,7 +27,7 @@
.Sh DESCRIPTION
When
.Nm
-is invoked without arguments it displays the current datetime
+is invoked without arguments it displays the current time
Otherwise, depending on the options specified,
will print the datetime in a user-defined way.
.Sh OPTIONS
@@ -35,66 +35,9 @@ will print the datetime in a user-defined way.
.It Fl d Ar datetime
Use
.Ar datetime
-instead of current datetime.
-.\" utils-std: Collection of commonly available Unix tools
-.\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
-.\" SPDX-License-Identifier: MPL-2.0
-.\"
-.\" Example:
-.\" .Fl d Ar datetime
-.\" .so lib/datetime_parse.mdoc
-.\"
-Should be formatted either with a leading @ (at) symbol followed by
-the Unix timestamp (number of seconds before and after 1970-01-01 00:00:00Z),
-for example
-.Ql @1698791420
-corresponds to 2023-10-31 23:30:20 UTC
-.Pp
-Or as Email / "Internet Message Format" (RFC5322, RFC2822, RFC822), for example:
-.Bl -bullet -compact
-.It
-.Ql Fri, 21 Nov 1997 09:55:06 -0600
-.It
-.Ql 21 Nov 97 09:55:06 GMT
-.El
-.Pp
-Or an
-.Xr asctime 3 Ns -like
-format, for example:
-.Ql Sun Sep 16 01:03:52 1973
-.Pp
-Or as RFC3339 which looks like
-.Ql YYYY-MM-DDThh:mm:SS[frac][tz] ,
-where:
-.Bl -tag -width Ds
-.It Ql YYYY-MM-DD
-Corresponds to %Y-%m-%d of
-.Xr strptime 3 .
-.It Ql T
-Is either
-.Ql T
-or a space.
-.It Ql [frac]
-Is either empty, or fractional seconds starting with either a comma
-.Pq \&,
-or a period
-.Pq \&. .
-.It Ql [tz]
-When empty it corresponds to local time.
-Otherwise it can be an UTC offset in the format
-.Ql [+-]HH:?MM
-or the letter
-.Qq Z ,
-signifying UTC.
-.El
-.Pp
-Some examples:
-.Bl -bullet -compact
-.It
-.Ql 2003-06-02T13:37:42.713Z
-.It
-.Ql 1971-01-02T03:04:05.678+0900
-.El
+instead of current time, see
+.Sx DATETIME FORMAT
+section for more details.
.It Fl f Ar now_format
Use
.Ar now_format
@@ -102,7 +45,7 @@ as the
.Xr strptime 3
format string for
.Ar now ,
-which will be used instead of the current datetime.
+which will be used instead of the current time.
.It Fl I Ar iso_fmt
Set the ISO-8601 resolution to format at with setting
.Ar iso_fmt
@@ -130,7 +73,7 @@ Use UTC (coordinated universal time) instead of the local time.
Use
.Ar epoch
(seconds relative to 1970-01-01 00:00:00 UTC)
-instead of current datetime.
+instead of current time.
.It Fl R
Set the default value of
.Ar format
@@ -169,6 +112,67 @@ with additionally
Otherwise defaults to
.Ql %c
.El
+.Sh DATETIME FORMAT
+.\" utils-std: Collection of commonly available Unix tools
+.\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
+.\" SPDX-License-Identifier: MPL-2.0
+.\"
+Multiple different but unambiguous formats are supported:
+@epoch, Email, asctime, RFC3339.
+.Ss @epoch
+Leading @ (at) symbol followed by
+the Unix timestamp (number of seconds before and after 1970-01-01 00:00:00Z),
+for example
+.Ql @1698791420
+corresponds to 2023-10-31 23:30:20 UTC
+.Ss Email
+Also known as "Internet Message Format" (RFC5322, RFC2822, RFC822), for example:
+.Bl -bullet -compact
+.It
+.Ql Fri, 21 Nov 1997 09:55:06 -0600
+.It
+.Ql 21 Nov 97 09:55:06 GMT
+.El
+.Ss asctime
+Output format of
+.Xr asctime 3 ,
+for example:
+.Ql Sun Sep 16 01:03:52 1973
+.Ss RFC3339
+Profile of ISO\ 8601:1988, found in modern protocols and file formats.
+Formatted as
+.Ql YYYY-MM-DDThh:mm:SS[frac][tz] ,
+where:
+.Bl -tag -width Ds
+.It Ql YYYY-MM-DD
+Corresponds to %Y-%m-%d of
+.Xr strptime 3 .
+.It Ql T
+Is either
+.Ql T
+or a space.
+.It Ql [frac]
+Is either empty, or fractional seconds starting with either a comma
+.Pq \&,
+or a period
+.Pq \&. .
+.It Ql [tz]
+When empty it corresponds to local time.
+Otherwise it can be an UTC offset in the format
+.Ql [+-]HH:?MM
+or the letter
+.Qq Z ,
+signifying UTC.
+.El
+.Pp
+Some examples:
+.Bl -bullet -compact
+.It
+.Ql 2003-06-02T13:37:42.713Z
+.It
+.Ql 1971-01-02T03:04:05.678+0900
+.El
+
.Sh ENVIRONMENT
Look at the manual page of
.Xr strftime 3
diff --git a/share/man/man1/echo.1 b/share/man/man1/echo.1
@@ -69,5 +69,11 @@ writes a octet of value 1.
Should be compliant with the
IEEE Std 1003.1-2024 (“POSIX.1”)
specification.
+.Sh HISTORY
+Support for
+.Fl e
+and
+.Fl E
+options was added in utils-std 0.0.3.
.Sh AUTHORS
.An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me
diff --git a/share/man/man1/head.1 b/share/man/man1/head.1
@@ -1,7 +1,7 @@
.\" utils-std: Collection of commonly available Unix tools
.\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
.\" SPDX-License-Identifier: MPL-2.0
-.Dd September 09, 2024
+.Dd June 29, 2025
.Dt HEAD 1
.Os
.Sh NAME
@@ -10,7 +10,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl qvz
-.Op Fl c Ar size | Fl n Ar num | Fl Ar num
+.Op Fl c Ar size | Fl n Oo Ar - Oc Ns Ar num | Fl Ar num
.Op Ar file...
.Sh DESCRIPTION
.Nm
@@ -35,12 +35,20 @@ in each
can be multiplied by one of KMGTP (Kilo, Mega, Giga, Tera, ...)
using power of 1024 by default, which can be either explicit via adding iB
(like MiB), or turned into powers of 1000 by adding B (like MB).
-.It Fl n Ar num , Fl Ar num
+.It Fl n Oo Ar - Oc Ns Ar num , Fl Ar num
Read the first
.Ar num
lines in each
.Ar file .
.Pp
+If
+.Ar num
+is negative, then it is relative to end-of-file, for example
+.Cm head
+.Fl n
+.Ar -2
+will omit the last 2 lines.
+.Pp
The
.Fl Ar num
form is historical, new scripts should use the standard
@@ -78,13 +86,17 @@ is set:
should be compliant with the
IEEE Std 1003.1-2024 (“POSIX.1”)
specification.
-.br
+.Pp
The
.Fl q ,
.Fl v ,
and
.Fl z
options are extensions.
+Negative values in option
+.Fl n
+is a extension inspired by GNU coreutils.
+.br
The
.Fl Ar num
option is historical.
diff --git a/share/man/man1/realpath.1 b/share/man/man1/realpath.1
@@ -63,5 +63,9 @@ The options
and support for multiple
.Ar path
arguments are extensions present for compatibility with existing software.
+.Sh HISTORY
+Support for
+.Fl q
+option was added in utils-std 0.0.6.
.Sh AUTHORS
.An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me
diff --git a/share/man/man1/touch.1 b/share/man/man1/touch.1
@@ -10,13 +10,14 @@
.Sh SYNOPSIS
.Nm
.Op Fl acfhm
-.Op Fl d Ar isotime | Fl t Ar datetime | Fl r Ar ref_file
+.Op Fl d Ar datetime | Fl t Ar timestamp | Fl r Ar ref_file
.Ar file...
.Sh DESCRIPTION
.Nm
changes the date modification and access times on each
.Ar file
it is given.
+.Sh OPTIONS
.Bl -tag -width Ds
.It Fl a
Change the access time, no changes to modification time unless
@@ -35,35 +36,71 @@ in 2011,
.Fx
in 2012.
.\" Let's not publicly document too much that illumos still supports it
-.It Fl d Ar isotime
+.It Fl d Ar datetime
+Use
+.Ar datetime
+instead of current time, see
+.Sx DATETIME FORMAT
+section for more details.
+.It Fl h
+Do not follow symlinks.
+.It Fl m
+Change the modification time, no changes to access time unless
+.Fl a
+is also given.
+.It Fl t Ar timestamp
+Use the specified
+.Ar timestamp
+instead of the current time, with the form
+.Oo Oo CC Oc Ns YY Oc Ns MMDDhhmm Ns Oo \.SS Oc
+where:
+.Bl -tag -width _MMDDhhmm_
+.It Ql CC
+Corresponds to the first 2 digits of the year, aka %C
+.It Ql YY
+Corresponds to the last 2 digits of the year, aka %y
+.It Ql MMDDhhmm
+Corresponds to month, day, hours, minutes aka %m%d%H%M
+.It Ql .SS
+Corresponds to the seconds
+.El
+.Pp
+For example:
+.Ql 200306021337.42
+.It Fl r Ar ref_file
+Use the corresponding times of the file at
+.Ar ref_file
+instead of the current time.
+.El
+.Sh DATETIME FORMAT
.\" utils-std: Collection of commonly available Unix tools
.\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
.\" SPDX-License-Identifier: MPL-2.0
.\"
-.\" Example:
-.\" .Fl d Ar datetime
-.\" .so lib/datetime_parse.mdoc
-.\"
-Should be formatted either with a leading @ (at) symbol followed by
+Multiple different but unambiguous formats are supported:
+@epoch, Email, asctime, RFC3339.
+.Ss @epoch
+Leading @ (at) symbol followed by
the Unix timestamp (number of seconds before and after 1970-01-01 00:00:00Z),
for example
.Ql @1698791420
corresponds to 2023-10-31 23:30:20 UTC
-.Pp
-Or as Email / "Internet Message Format" (RFC5322, RFC2822, RFC822), for example:
+.Ss Email
+Also known as "Internet Message Format" (RFC5322, RFC2822, RFC822), for example:
.Bl -bullet -compact
.It
.Ql Fri, 21 Nov 1997 09:55:06 -0600
.It
.Ql 21 Nov 97 09:55:06 GMT
.El
-.Pp
-Or an
-.Xr asctime 3 Ns -like
-format, for example:
+.Ss asctime
+Output format of
+.Xr asctime 3 ,
+for example:
.Ql Sun Sep 16 01:03:52 1973
-.Pp
-Or as RFC3339 which looks like
+.Ss RFC3339
+Profile of ISO\ 8601:1988, found in modern protocols and file formats.
+Formatted as
.Ql YYYY-MM-DDThh:mm:SS[frac][tz] ,
where:
.Bl -tag -width Ds
@@ -95,36 +132,7 @@ Some examples:
.It
.Ql 1971-01-02T03:04:05.678+0900
.El
-.It Fl h
-Do not follow symlinks.
-.It Fl m
-Change the modification time, no changes to access time unless
-.Fl a
-is also given.
-.It Fl t Ar datetime
-Use the specified
-.Ar datetime
-instead of the current time, with the form
-.Oo Oo CC Oc Ns YY Oc Ns MMDDhhmm Ns Oo \.SS Oc
-where:
-.Bl -tag -width _MMDDhhmm_
-.It Ql CC
-Corresponds to the first 2 digits of the year, aka %C
-.It Ql YY
-Corresponds to the last 2 digits of the year, aka %y
-.It Ql MMDDhhmm
-Corresponds to month, day, hours, minutes aka %m%d%H%M
-.It Ql .SS
-Corresponds to the seconds
-.El
-.Pp
-For example:
-.Ql 200306021337.42
-.It Fl r Ar ref_file
-Use the corresponding times of the file at
-.Ar ref_file
-instead of the current time.
-.El
+
.Sh EXIT STATUS
.Ex -std
Note: Will exit with failure when
diff --git a/share/man/man1/uname.1 b/share/man/man1/uname.1
@@ -9,7 +9,7 @@
.Nd return system name and information
.Sh SYNOPSIS
.Nm
-.Op Fl amnrsv
+.Op Fl amnoprsv
.Sh DESCRIPTION
.Nm
prints the operating system name, and optionally more information about the system to standard output, separated by spaces.
@@ -22,6 +22,10 @@ Enable all options, equivalent to passing
Write machine name, also known as the processor architecture.
.It Fl n
Write network node name, also known as hostname.
+.It Fl o
+(non-standard) Write operating system name.
+Currently aliased to
+.Fl s .
.It Fl p
(non-standard) Write processor type.
Currently aliased to
@@ -48,7 +52,9 @@ IEEE Std 1003.1-2024 (“POSIX.1”)
specification.
.Pp
The
+.Fl o
+and
.Fl p
-option is an extension.
+options are extensions.
.Sh AUTHORS
.An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me