Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the content redirectors in dos

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article will explain in detail what are the content redirectors in dos. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Is there a way to save the help information displayed in the command line window?

The answer is yes, and there is more than one answer.

A slightly more tedious way is to copy the information from the command line window and paste it into the text to save it. This operation is more tedious: right-click in the command line window, then select "tag", use the mouse to pull out the copy range, and then hit enter, and finally, paste into the text.

An efficient way is to use redirect symbols to redirect the information originally output to the cmd window to a text file.

There are two redirect symbols: > and > >. Their function is to change the output direction of all kinds of prompts and output them to a specified place-all kinds of prompts are output to the screen by default. For example: tree /? > help.txt, this command statement redirects the help information of the tree command to the help.txt file, and help > nul redirects the prompt information of the help command to the empty device (nul represents the empty device).

Want to see what basic commands are available in cmd? You can see it by typing help in the cmd window; if you want to save these basic command information, use help > d:\ list.txt, and then go to the root directory of D disk to find the list.txt file and open it.

> and > > although both play the role of redirecting prompts, their roles are slightly different.

A single > indicates that the prompt message is redirected by overwriting, that is, if the destination already has content, the original content will be erased and filled with new content

> > means to redirect the prompt message by appending, that is, if the destination originally has content, the original content will remain unchanged, and the new content will be appended after the original content.

For example, suppose the content in d:\ test.txt is: I Love batch. Then, in the cmd window, use the following two statements: echo me,too > d:\ test.txt and echo me,too > d:\ test.txt, respectively, and you will find that after using the first statement, there is only one line in test.txt: me,too, while after using the second statement, there will be two items in test.txt, I Love batch and me,too.

This is the end of this article on "what are the content redirectors in dos?". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report