When I display the manual for pwd
command, it says that long options like --physical
are supported
$ man pwd
PWD(1) User Commands PWD(1)
NAME
pwd - print name of current/working directory
SYNOPSIS
pwd [OPTION]...
DESCRIPTION
Print the full filename of the current working directory.
-L, --logical
use PWD from environment, even if it contains symlinks
-P, --physical
avoid all symlinks
However, it fails when I type the following
$ pwd --physical
-bash: pwd: --: invalid option
pwd: usage: pwd [-LP]
Why are long options not working for me?
I'm using RHEL 6.4. No alias for pwd is configured. Looks like it's standard pwd:
$ which pwd
/bin/pwd
type
instead ofwhich
, sincewhich
only shows commands, whiletype
shows keywords, builtins, aliases, functions, and commands (and hashed command paths). For more details see Why not use “which”? What to use then?man pwd
has following note:your shell may have its own version of pwd, which usually supersedes the version described here. Please refer to your shell's documentation for details about the options it supports
at the bottom ofDESCRIPTION
section.