猛虎下山是什么生肖| 胃胀是什么原因导致的| 安陵容什么时候变坏的| 阴囊潮湿是什么原因造成的| 来苏水又叫什么名字| 被蛇咬了挂什么科| 鱼用什么游泳| 垂体分泌什么激素| 巴氏征阳性是什么意思| 卵泡是什么意思| 维生素c对身体有什么好处| bpd是胎儿的什么| 水手是干什么的| 马齿笕有什么功效| 早上起来口苦吃什么药| 尿酸高是什么原因引起的| 天津为什么叫天津卫| 20至30元什么烟最好抽| 人肉是什么味道的| 觉悟是什么意思| 渠道货是什么意思| 儿童乐园有什么好玩的| 吃什么东西排酸最快| 孕妇吃什么容易滑胎| 姨妈期间可以吃什么水果| 确立是什么意思| 伤口好转的迹象是什么| 多囊卵巢是什么意思| 双排是什么意思| 发瘟是什么意思| 兰州市区有什么好玩的地方| 跪安是什么意思| elephant是什么意思| 子宫内膜增厚吃什么药| 脚心起水泡是什么病症| 性激素六项什么时候查| 米线和米粉有什么区别| 百合为什么是苦的| 摩羯座什么时候| 什么叫热射病| apl医学上是什么意思| 饭票是什么意思| 功高震主是什么意思| 8月份是什么星座| 省政协委员是什么级别| 145是什么意思| 口臭口苦吃什么药最好| 客厅沙发后面墙上挂什么画好| 嗡阿吽是什么意思| 兴奋剂是什么| 千里马比喻什么样的人| 支那人什么意思| 抗风疹病毒抗体igg高是什么意思| 月加厷念什么| 北阳台适合种什么植物| pap是什么意思| 见分晓是什么意思| 胆气虚吃什么中成药| 香菜不能和什么一起吃| 合胞病毒用什么药最好| epo是什么意思| 什么叫玄关| cr值是什么| 咳嗽吃什么水果好| tki是什么意思| 红点是什么原因引起的| 洋葱有什么功效| 蹉跎是什么意思| save什么意思| 口腔溃疡不能吃什么| 皮肤痒是什么病的前兆| 为什么男生| 氯化钾主治什么病| 体细胞是什么| 为什么会生化| 快递已揽件是什么意思| 糖衣炮弹什么意思| 2.22什么星座| 什么茶有助于睡眠| 包皮炎挂什么科| 政治面貌填什么| 怀孕分泌物是什么样的| 属兔本命佛是什么佛| 吃什么皮肤变白| 调理脾胃吃什么好| 有什么花| 沏茶是什么意思| 妇科检查清洁度二度是什么意思| 二院是什么医院| 平均血红蛋白量偏高是什么意思| 七月份是什么季节| 金球奖什么时候颁发| 衣带渐宽终不悔是什么意思| 软著是什么| 音节是指什么| 夏天喝什么水最解渴| 腰胀是什么原因引起的| 什么头什么尾| 糖类抗原50是什么指标| 风疹吃什么药好得快| 面包用什么面粉| mmc什么意思| fancl是什么品牌| 当医生要什么学历| 五月五日什么星座| 山药跟淮山有什么区别| 小孩子为什么会得抽动症| 结石能喝什么茶| 一什么椅子| 落子是什么意思| press什么意思| 做什么能快速赚钱| 口舌生疮吃什么药最好| nfl是什么意思| 突厥是现在的什么地方| 颠鸾倒凤什么意思| 胃结石有什么症状表现| 栗棕色是什么颜色| 什么是甲减病| 今天吃什么| 日加匀念什么| 吃叶酸有什么好处| 脾胃不好吃什么水果| 电表走的快是什么原因| eft是什么意思| 1987属什么生肖| 一什么童话| 烧钱是什么意思| 木薯是什么东西| 路上遇到蛇是什么征兆| 突然发胖要警惕什么病| 什么的豆角| 日出扶桑是什么意思| 网织红细胞高说明什么| 梦见自己抬棺材是什么意思| 子宫腺肌症有什么症状| 脂质是什么| 爆单什么意思| 三羊开泰什么意思| 月黑风高什么意思| 七月七日是什么生肖| 血管瘪是什么原因| 猫为什么吃老鼠| 择日是什么意思| 吃什么油对身体好| 硒片什么牌子好| 木加号读什么| 春捂秋冻指的是什么意思| 背痒是什么原因| 轧戏是什么意思| 浑身疼吃什么药管用| 皮肤发白一块一块的是什么病| 有结石不能吃什么东西| 进字五行属什么| 梦见打老公是什么意思| 什么人不能吃狗肉| 口腔溃疡是什么原因| 8月2号是什么星座| 长期干咳无痰是什么原因引起的| 儿童头疼挂什么科| 牛肉用什么腌制比较嫩| 尿血吃什么药| 检查肝肾功能挂什么科| 肝阳上亢吃什么药| yrc是什么牌子的鞋| 菊花茶和枸杞一起泡水有什么好处| 糖尿病患者可以吃什么水果| 阴道长什么样子| 今天什么属相| 流变是什么意思| 金牛座是什么星座| 83年属猪是什么命| 鹿柴什么意思| 标王是什么意思| 黄芪是什么样子的| 浅蓝色是什么颜色| 龟头敏感吃什么药| idh是什么意思| 高回声结节是什么意思| 夏天可以种什么花| 8023是什么意思啊| 7月6日是什么星座| 8月26日什么星座| 十一月一日是什么星座| 易烊千玺是什么星座| 便秘吃什么水果| 忠实是什么意思| 榴莲什么人不能吃| 住院门槛费是什么意思| 年收入10万什么水平| hcg是什么意思| 构筑物是什么意思| 水仙什么意思| 深圳市市长什么级别| 什么山没有石头| 孕妇吃什么水果好| 前列腺钙化斑是什么意思| 白芷有什么作用与功效| 怀孕胎盘低有什么影响| 易拉罐是什么垃圾| 谷氨酰转肽酶偏高是什么意思| 日复一日是什么意思| 促胃动力药什么时候吃| 3.7号是什么星座| 菠萝什么季节成熟| 十一月是什么星座| 下眼皮跳动是什么原因| 数不胜数是什么生肖| 外传是什么意思| 12月16是什么星座| 二次元是什么| 猪拉稀用什么药最快| 榴莲和什么相克| 淋巴门消失是什么意思| 什么叫词牌名| 叶黄素对眼睛有什么功效| 感染幽门螺旋杆菌会出现什么症状| 肝胆脾挂什么科| 驾驶证照片是什么底色| 水可以加什么偏旁| 猝死是什么意思| 韧带损伤有什么症状| gg是什么品牌| 吃什么东西能减肥| 蝼蛄是什么| 来月经期间吃什么最好| 睡前喝蜂蜜水有什么好处| 莫名其妙的心情不好是什么原因| 你最想做什么| 利口酒是什么酒| 腱子肉是什么意思| 冷都男是什么意思| 吃辣椒过敏是什么症状| 63岁属什么生肖| spa按摩是什么意思| 添堵是什么意思| 乳房疼痛挂什么科| 肩膀疼应该挂什么科| 挥霍是什么意思| 空调干燥是什么意思| barbie是什么意思| 食道炎吃什么药好| 绿茶属于什么茶| 刺五加配什么药治失眠| 仪表堂堂是什么生肖| 中焦湿热吃什么中成药| 鄂尔多斯是什么意思| 晚上睡觉盗汗是什么原因| 姜枣茶什么季节喝最好| romantic是什么意思| 夏季喝什么汤好| 黑木耳不能和什么一起吃| 切除一侧输卵管对女性有什么影响| 会阴是什么部位| 车厘子和樱桃有什么区别| 节育环要什么时候取才是最佳时期| 尿路感染是什么原因| 四风指什么| 为什么叫| 总警司相当于大陆什么官| 伏笔是什么意思| 腿痛去医院挂什么科| 吃什么对血管好| 什么功高| 百度Jump to content

Информации на двух языках

From Wikipedia, the free encyclopedia
(Redirected from CMD.EXE)
百度 除了新增V系列千元产品线,努比亚也在积极部署海外市场。

Command Prompt (cmd.exe)
Other namesWindows Command Processor
Developer(s)Microsoft, IBM, ReactOS contributors
Initial releaseDecember 1987; 37 years ago (1987-12)
Operating system
PlatformIA-32, x86-64, ARM (and historically DEC Alpha, MIPS, PowerPC, and Itanium)
PredecessorCOMMAND.COM
TypeCommand-line interpreter

cmd.exe, a.k.a. Command Prompt, is a shell program on later versions of Windows (NT and CE families), OS/2,[1] eComStation, ArcaOS, and ReactOS.[2] In some versions of Windows (CE .NET 4.2,[3] CE 5.0[4] and Embedded CE 6.0[5]) it is referred to as the Command Processor Shell. Implementation differs between operating systems, but with significant consistency of behavior and available commands.

Older, related operating systems, DOS and Windows 9x, provided COMMAND.COM as the shell. cmd.exe replaced COMMAND.COM in the Windows product line with the introduction of NT. Current versions of Windows include PowerShell as an alternative shell that runs side-by-side with cmd.exe.

The initial version of cmd.exe for Windows NT was developed by Therese Stowell.[6] Windows CE 2.11 was the first embedded Windows release to support a console and a Windows CE version of cmd.exe.[7] The ReactOS implementation of cmd.exe is derived from FreeCOM, the FreeDOS command line interpreter.[2]

Use

[edit]

Desktop integration

[edit]

In Windows, the shell is presented in the desktop via Windows Terminal or on older versions via Windows Console.

Concurrent piping

[edit]

In OS/2 and Windows, the shell supports pipes to allow both sides of a pipeline to run concurrently. As a result, it is possible to redirect the standard error stream. In contrast, COMMAND.COM uses temporary files, and runs the two sides serially, one after the other.

Command separator

[edit]

Multiple commands can be included in a single line using the command separator & or &&.[8]

With the & separator, a subsequent command is executed even if the previous command indicates an error.[9] In the following example, each of the three commands is executed, one after the other, and regardless of their result code.

>CommandA & CommandB & CommandC

With the && separator, a command must complete successfully for the subsequent command to execute. In the following example, CommandB only executes if CommandA completes successfully, and CommandC only executes if CommandB also completes successfully.

>CommandA && CommandB && CommandC

Command line limit

[edit]

The shell limits the length of a command line which includes entered text, individual environment variables that are inherited by other processes, and all environment variable expansions[10] On Windows XP and later, the maximum length is 8191 (213-1) characters. On earlier versions, such as Windows 2000 or Windows NT 4.0, the maximum length is 2047 (211-1) characters.

Escaping special characters

[edit]

The shell reserves the following characters as special:[8] &<>[]{}^=;!'+,`~ and whitespace. In some cases, an argument that contains such characters must be enclosed in double quotes to escape from the special character handling. For example:

>echo me & you
me
'you' is not recognized as an internal or external command,
operable program or batch file.

>echo "me & you"
"me & you"

Internal commands

[edit]

The following sections list internal commands for implementations of the shell on various operating systems.

OS/2

[edit]
cmd.exe running in OS/2 Window on OS/2 version 1.3

Internal commands in OS/2:[11]

Windows NT family

[edit]
cmd.exe running in Windows Terminal on Ukrainian Windows 11

Internal commands in Windows NT and later:[12]

Windows CE

[edit]
Pocket CMD v 3.0 (cmd.exe) on Windows CE 3.0

Internal commands in Windows CE .NET 4.2,[13] Windows CE 5.0[14] and Windows Embedded CE 6.0:[15]

  • attrib
  • call
  • cd
  • chdir
  • cls
  • copy
  • date
  • del
  • dir
  • echo
  • erase
  • exit
  • goto
  • help
  • if
  • md
  • mkdir
  • move
  • path
  • pause
  • prompt
  • pwd
  • rd
  • rem
  • ren
  • rename
  • rmdir
  • set
  • shift
  • start
  • time
  • title
  • type

The net command is available as an external command.

ReactOS

[edit]
cmd.exe on ReactOS

Internal commands in ReactOS:[2]

  • ?
  • alias
  • assoc
  • beep
  • call
  • cd
  • chdir
  • choice
  • cls
  • color
  • copy
  • ctty
  • date
  • del
  • delete
  • delay
  • dir
  • dirs
  • echo
  • echos
  • echoerr
  • echoserr
  • endlocal
  • erase
  • exit
  • for
  • free
  • goto
  • history
  • if
  • memory
  • md
  • mkdir
  • mklink
  • move
  • path
  • pause
  • popd
  • prompt
  • pushd
  • rd
  • rmdir
  • rem
  • ren
  • rename
  • replace
  • screen
  • set
  • setlocal
  • shift
  • start
  • time
  • timer
  • title
  • type
  • ver
  • verify
  • vol

Comparison with COMMAND.COM

[edit]

On Windows, cmd.exe provides various user experience enhancments as compared to COMMAND.COM, including:

  • More detailed error reporting for malformed commands than the generic COMMAND.COM "Bad command or file name". In OS/2, errors are reported in the chosen language of the system, their text being taken from the system message files. The HELP command can then be issued with the error message number to obtain further information.
  • Supports using of arrow keys to scroll through command history. With COMMAND.COM, this functionality was only available in DR DOS; via HISTORY) and later via an external component called DOSKEY.
  • Adds rotating command-line completion for file and folder paths, where the user can cycle through results for the prefix using the Tab ?, and ? Shift+Tab ? for reverse direction.
  • Treats the caret character (^) as the escape character; the character following it is to be taken literally. There are special characters in cmd.exe and COMMAND.COM that are meant to alter the behavior of the command line processor. The caret character forces the command line processor to interpret them literally.
  • Supports delayed variable expansion with SETLOCAL EnableDelayedExpansion, allowing values of variables to be calculated at runtime instead of during parsing of script before execution (Windows 2000 and later), fixing DOS idioms that made using control structures hard and complex.[16] The extensions can be disabled, providing a stricter compatibility mode.
  • The COMMAND.COM DELTREE command was merged into the rd command via the /S switch.
  • SetLocal and EndLocal commands limit the scope of changes to the environment. Changes made to the command line environment after SetLocal are local to the batch file. EndLocal restores the previous settings.[17]
  • The call command allows subroutines within batch file. The COMMAND.COM CALL command only supports calling external batch files.
  • File name parser extensions to the set command are comparable with C shell.[further explanation needed]
  • The set command can perform expression evaluation.
  • An expansion of the for command supports parsing files and arbitrary sets in addition to file names.
  • The new pushd and popd commands provide access past navigated paths similar to forward and back buttons in a web browser or File Explorer.
  • The conditional if command can perform case-insensitive comparisons and numeric equality and inequality comparisons in addition to case-sensitive string comparisons. This was available in DR-DOS, but not in PC DOS or MS-DOS.

See also

[edit]

References

[edit]
  1. ^ "Notes on using the default OS/2 command processor (CMD.EXE)". www.tavi.co.uk.
  2. ^ a b c "reactos/reactos". GitHub. December 4, 2021.
  3. ^ "Command Processor Shell (Windows CE .NET 4.2)". Microsoft Docs. June 30, 2006. Archived from the original on August 31, 2022.
  4. ^ "Command Processor Shell (Windows CE 5.0)". Microsoft Docs. September 14, 2012. Archived from the original on August 28, 2022.
  5. ^ "Command Processor Shell (Windows Embedded CE 6.0)". Microsoft Docs. 2012. Archived from the original on September 5, 2022.
  6. ^ Zachary, G. Pascal (1994). Showstopper! The Breakneck Race to Create Windows NT and the Next Generation at Microsoft. The Free Press. ISBN 0-02-935671-7.
  7. ^ Douglas McConnaughey Boling (2001). Programming Microsoft Windows CE (2nd ed.). Microsoft Press. ISBN 978-0735614437.
  8. ^ a b "cmd". Microsoft Learn. September 12, 2023. Archived from the original on November 21, 2023.
  9. ^ "Command Redirection, Pipes - Windows CMD - SS64.com". ss64.com. Retrieved September 23, 2021.
  10. ^ Command prompt (Cmd.exe) command-line string limitation
  11. ^ Microsoft Operating System/2 User's Reference (PDF). Microsoft. 1987.
  12. ^ Hill, Tim (1998). Windows NT Shell Scripting. Macmillan Technical Publishing. ISBN 978-1578700479.
  13. ^ "Command Processor Commands (Windows CE .NET 4.2)". Microsoft Docs. June 30, 2006. Archived from the original on August 31, 2022.
  14. ^ "Command Processor Commands (Windows CE 5.0)". Microsoft Docs. September 14, 2012. Archived from the original on August 31, 2022.
  15. ^ "Command Processor Commands (Windows Embedded CE 6.0)". Microsoft Docs. January 5, 2012. Archived from the original on September 6, 2022.
  16. ^ "Windows 2000 delayed environment variable expansion". Windows IT Pro. Archived from the original on July 13, 2015. Retrieved July 13, 2015.
  17. ^ "Setlocal". TechNet. Microsoft. September 11, 2009. Retrieved January 13, 2015.

Further reading

[edit]
[edit]
牙龈发炎是什么原因 黄山毛峰是什么茶 什么是生物制剂药 嘴唇不红润是什么原因 碱性是什么意思
荔枝什么时候成熟 中国的四大发明是什么 惠五行属什么 外阴是指什么部位 痈是什么
三更是什么生肖 儿童鼻炎挂什么科 双卵巢是什么意思 间歇性跛行是什么意思 宝宝拉肚子吃什么药
倒嗓是什么意思 阉割是什么意思 流鼻涕咳嗽吃什么药 狂野是什么意思 嗯呢是什么意思
鼻子上长痘痘是什么原因hcv7jop6ns0r.cn 黄磊为什么不娶刘若英hcv8jop7ns6r.cn 血糖高吃什么水果好能降糖hcv7jop4ns8r.cn 红豆是什么意思0297y7.com 密度是什么hcv8jop9ns6r.cn
亚麻酸是什么东西hcv8jop1ns5r.cn 小便泡沫多是什么原因hcv9jop2ns2r.cn 前列腺增生是什么原因引起的hcv9jop2ns6r.cn 低烧吃什么520myf.com 六字真言是什么hcv8jop5ns1r.cn
属狗适合佩戴什么饰品gangsutong.com 面部脂溢性皮炎用什么药hcv7jop5ns6r.cn 感康是什么hcv9jop2ns2r.cn 喝了藿香正气水不能吃什么hcv9jop3ns1r.cn 打豆浆用什么豆子hcv8jop9ns1r.cn
靶向药物是什么hcv9jop3ns6r.cn 鸭屎香是什么茶hcv8jop3ns8r.cn 3c数码产品是什么dayuxmw.com 酒精是什么imcecn.com 小确幸是什么意思sscsqa.com
百度