เมื่อฉันแสดงคู่มือสำหรับ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 ดูเหมือนว่าเป็น pwd มาตรฐาน:
$ which pwd
/bin/pwd
typeแทนwhichเนื่องจากwhichคำสั่งเพียงแสดงให้เห็นว่าในขณะที่typeคำหลักที่แสดงให้เห็นว่า builtins นามแฝงฟังก์ชั่นและคำสั่ง (และเส้นทางคำสั่งถก) สำหรับรายละเอียดเพิ่มเติมดูเหตุใดจึงไม่ใช้“ อันไหน” จะใช้อะไรดี?
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ส่วน