NetBSD-Docs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: stat(1) manpage displays non-existant (?) option



On Sun, 3 Jan 2016 18:34:36 +0200
Rares Aioanei <schaiba%gmail.com@localhost> wrote:

> Environment is NetBSD 7.0/i386. The manpage displays -v as an option : 
> 
> "-v            Turn off quiet mode."
> 
> However, that option is not recognized by stat(1) : 
> 
> $ stat -v
> stat: unknown option -- v
> 
> However (again), the stat(1) code seems to indicate otherwise : 
> 
> while ((ch = getopt(argc, argv, options)) != -1)

If you look at the synopsis in the man page, you'll see that it's only
an option when stat is called as readlink. It makes it print a warning
for nonexisting files, which stat does by default unless called with
-q, which turns on quiet mode. (I guess the man page could be more
verbose about this, and also describe the option as turning on
verbosity.)

kind regards
dieter


Home | Main Index | Thread Index | Old Index