Module Name: src Committed By: jkoshy Date: Sun Feb 18 19:35:38 UTC 2024
Modified Files: src/usr.bin/getconf: getconf.1 Log Message: getconf.1: Note that leading underscores in configuration variable names are ignored by getconf(1). While here, add a section with examples, and make the synopsis more concise. PR bin/57875 To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/getconf/getconf.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/getconf/getconf.1 diff -u src/usr.bin/getconf/getconf.1:1.13 src/usr.bin/getconf/getconf.1:1.14 --- src/usr.bin/getconf/getconf.1:1.13 Sun Apr 13 01:45:34 2014 +++ src/usr.bin/getconf/getconf.1 Sun Feb 18 19:35:38 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: getconf.1,v 1.13 2014/04/13 01:45:34 snj Exp $ +.\" $NetBSD: getconf.1,v 1.14 2024/02/18 19:35:38 jkoshy Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 9, 2011 +.Dd February 18, 2024 .Dt GETCONF 1 .Os .Sh NAME @@ -37,13 +37,10 @@ .Nm .Ar system_var .Nm -.Fl a -.Nm .Ar path_var .Ar pathname .Nm -.Fl a -.Ar pathname +.Fl a Op Ar pathname .Sh DESCRIPTION The .Nm @@ -80,8 +77,28 @@ standard output, in the format = .Va value .Dc . +.Pp +For compatibility with other operating systems, +.Nm +will ignore leading underscores in the names specified in the +.Ar system_var +and +.Ar path_var +arguments. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +To retrieve the number of configured processors, use: +.Bd -literal -offset indent +$ getconf NPROCESSORS_CONF +.Ed +.Pp +To retrieve the maximum number of bytes (excluding the trailing +.Dv NUL ) +for a filename in the current directory, use: +.Bd -literal -offset indent +$ getconf NAME_MAX . +.Ed .Sh SEE ALSO .Xr pathconf 2 , .Xr confstr 3 ,