跳转到内容

Bad command or file name

维基百科,自由的百科全书
MS-DOS错误讯息的画面

Bad command or file nameMS-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]

相关条目

[编辑]

参考资料

[编辑]
  1. ^ Jim Cooper, (2002). Using MS-DOS 6.22. Que Publishing. ISBN 9780789725738
  2. ^ Instructions. MSDN. Microsoft. 20 February 2014 [March 8, 2015]. (原始内容存档于June 30, 2018). 
  3. ^ Harry Phillips, Eric Skagerberg, (2002). "New Perspectives on Microsoft Windows 2000 MS-DOS Command Line, Comprehensive, Windows XP Enhanced". Cengage Learning. ISBN 1285963679
  4. ^ bash - execute_cmd.c. git.savannah.gnu.org. [2022-04-12] (英语). 
  5. ^ dash - main.c. git.kernel.org. [2022-04-12]. (原始内容存档于2022-04-12) (英语). 
  6. ^ zsh - exec.c. GitHub. [2022-04-12]. (原始内容存档于2022-05-21) (英语).