pwdコマンドのマニュアルを表示すると、などの長いオプション--physicalがサポートされていると表示されます
$ 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
ただし、次のように入力すると失敗します
$ pwd --physical
-bash: pwd: --: invalid option
pwd: usage: pwd [-LP]
長いオプションが機能しないのはなぜですか?
RHEL 6.4を使用しています。pwdのエイリアスは設定されていません。それは標準のパスワードのように見えます:
$ which pwd
/bin/pwd
1
マニュアルページは、bashの一部ではないスタンドアロンユーティリティ用です。
—
トーマスディッキー
使用
—
wjandrea
type代わりにwhichので、which一方のみ示してコマンド、type番組のキーワード、組み込みコマンド、エイリアス、関数、およびコマンド(およびハッシュコマンドパス)。詳細については、「どちら」を使用しないのかを
私のシステムで
—
Nykakin
man pwdは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、DESCRIPTIONセクションの下部に次のメモがあります。