Bad command or file name - 维基百科,自由的百科全书
Bad command or file name是MS-DOS常見的错误消息[1]。
COMMAND.COM在無法解讀其接收到指令的第一個單字時,就會產生此錯誤訊息。此單字需要和內部指令、執行檔或是批次檔的名稱完全相同,COMMAND.COM才能解讀[2]。因此此錯誤訊息對問題作了準確的描述,但沒有清楚的說明,容易讓新手困惑。錯誤訊息會讓人誤以為指令中某參數所標示的檔案受損或是不存在。後來此錯誤訊訊息的文字已有修改的比較清楚。Windows NT顯示的錯誤訊息是(其中"foo"是實際無法識別,造成錯誤的字)[3]:
"foo" is not recognized as an internal or external command,
operable program or batch file.
一些早期的Unix shell也顯示類似的錯誤訊息"foo: no such file or directory",也是準確描述問題,但是容易讓使用者誤解。大部份目前使用的shell會改類似foo: command not found"的訊息[4][5][6]。
相關條目
[编辑]參考資料
[编辑]- ^ Jim Cooper, (2002). Using MS-DOS 6.22. Que Publishing. ISBN 9780789725738
- ^ Instructions. MSDN. Microsoft. 20 February 2014 [March 8, 2015]. (原始内容存档于June 30, 2018).
- ^ Harry Phillips, Eric Skagerberg, (2002). "New Perspectives on Microsoft Windows 2000 MS-DOS Command Line, Comprehensive, Windows XP Enhanced". Cengage Learning. ISBN 1285963679
- ^ bash - execute_cmd.c. git.savannah.gnu.org. [2022-04-12] (英语).
- ^ dash - main.c. git.kernel.org. [2022-04-12]. (原始内容存档于2022-04-12) (英语).
- ^ zsh - exec.c. GitHub. [2022-04-12]. (原始内容存档于2022-05-21) (英语).