- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
dos_shell命令文件名匹配输出重定向(The dos_shell command filename matches the output redirection)
dos_shell命令文件名匹配输出重定向(The dos_shell command filename matches the output redirection)
File name match/output redirection
One, file name match
File name matching allows you to specify multiple files without having to name each. You will use some special characters called wildcards.
Suppose you want to delete all files that end in a string .bak with rm command. You can also use the wildcard * : in addition to following all the filenames as parameters after rm :
The rm *. Bak
* can match one or more characters. In this example, you tell the shell to extend the parameters of the command rm to all files that end with *.bak, and the shell tells the rm command with the extended parameters.
As you will see, the shell reads and interprets the command line before the command executes. Because of this, you can use wildcards for the parameters of the shell command.
Lets take a closer look at the wildcard *. Suppose you have a directory containing documents 124. Bak , 346. Bak and 583. Bak. You want to keep the file 583. Bak.
The rm * 4 *. Bak
The shell extends * 4 *.bak to all strings containing 4 and ending with .bak .
Notice that rm 4 *.bak is unable to work, because this matches the file at the beginning of 4. Since there is no such file in the directory, the shell extends this pattern to an empty string, so rm will return an error message:
Rm: always remove ` 4 *. Bak : No to the file or directory
If you want to keep the file 345. Bak, and delete 124. Bak and 583. Bak. This may seem a bit difficult because the name of the deleted file is different except for the suffix. Fortunately, you can specify the file in no way:
Rm *! [6]. Bak
This will be read as: in addition to files ending with 6.bak, delete all other files that end with .bak . You must put the negation sign and the anti-character (here is 6) in parentheses, or the shell will interpret the exclamation mark as the beginning of a history substitution. The inverse is valid in all the matching modes described in this ar
您可能关注的文档
- 高中化学常见物的性质(The nature of high school chemistry).doc
- 高中化学3(High school chemistry 3).doc
- 高中化学必修1 第四章知识点(High school chemistry 1 chapter 4 knowledge points).doc
- 高中化学方程式总结_高考吧_贴吧(High school chemistry equation summary _ college entrance examination).doc
- 高中化学方程式总结(Summary of high school chemistry equations).doc
- 高中化学物质颜色(High school chemistry color).doc
- 高中化学知识点总结(High school chemistry point summary).doc
- 高中化学讲义整理2(A high school chemistry handout).doc
- 高中地理必修一、二、三复习要点(High school geography one, two, three review points).doc
- 高中地理必修1复习(High school geography must revise 1 review).doc
- dota中各英雄的简称还有各种操作指令(Each hero in dota also has various operations instructions).doc
- DOS命令之ping命令大全详解(The pings of the DOS command are fully detailed).doc
- dota试题(Dota questions).doc
- DOS下应用程序的使用方法(The method of application under DOS).doc
- -VC 6_0实现PC机与单片机的串行通信(- VC 6_0 realizes serial communication between PC and MCU).doc
- 200804VB程序设计基础期中考卷及答案(200804VB program design basic midterm examination and answers).doc
- 191725 福师《经济地理学》在线作业二(The economic geography of 19,1725).doc
- 20090331-高级检验工(20090331 - senior inspector).doc
- 2015中国汽车论坛精彩热点介绍(Introduction of China automobile BBS hot spot in 2015).doc
- 2016年假期伙伴(寒假)四年级数学答案(2016 vacation partner (winter vacation) fourth grade math answer).doc
文档评论(0)