History

為什麼會有一個“。”在chown工作?

  • March 26, 2020

為什麼 GNUchown user.group工作?文件沒有說明支持的語法。背後有什麼動人的故事嗎?

info chown很清楚:

Some older scripts may still use `.' in place of the `:' separator.
POSIX 1003.1-2001 (*note Standards conformance::) does not require
support for that, but for backward compatibility GNU `chown' supports
`.' so long as no ambiguity results. New scripts should avoid the use
of `.' because it is not portable, and because it has undesirable
results if the entire OWNER`.'GROUP happens to identify a user whose
name contains `.'.

GNU程序的情況下,不僅需要檢查頁面,man還需要檢查info頁面,因為GNU 人討厭手冊頁(來自man tar)。

引用自:https://unix.stackexchange.com/questions/245210