Vertically align the modes and owners.
.IP "\fB\-x, \-\-mountpoints\fP"
Show mountpoint directories with a 'D' rather than a 'd'.
+.IP "\fB\-h\fR, \fB\-\-help\fR"
+Output help text and exit.
+.IP "\fB\-V\fR, \fB\-\-version\fR"
+Output version information and exit.
.SH AUTHOR
The original
.B namei
printf(_(
" -h, --help displays this help text\n"
+ " -V, --version output version information and exit\n"
" -x, --mountpoints show mount point directories with a 'D'\n"
" -m, --modes show the mode bits of each file\n"
" -o, --owners show owner and group name of each file\n"
static const struct option longopts[] =
{
{ "help", 0, 0, 'h' },
+ { "version", 0, 0, 'V' },
{ "mountpoints",0, 0, 'x' },
{ "modes", 0, 0, 'm' },
{ "owners", 0, 0, 'o' },
if (argc < 2)
usage(EXIT_FAILURE);
- while ((c = getopt_long(argc, argv, "+h?lmnovx", longopts, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "+h?Vlmnovx", longopts, NULL)) != -1) {
switch(c) {
case 'h':
case '?':
usage(EXIT_SUCCESS);
break;
+ case 'V':
+ printf(_("%s from %s\n"), program_invocation_short_name,
+ PACKAGE_STRING);
+ return EXIT_SUCCESS;
case 'l':
flags |= (NAMEI_OWNERS | NAMEI_MODES | NAMEI_VERTICAL);
break;