In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces dos how to achieve directory jump, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
For example, when we open a command line window, it usually goes like this: find the start menu in the lower left corner of the desktop, open run, type cmd, and enter. At this point, the default current directory of the command line window is under the path of the current user, for example: C:\ Documents and Settings\ JM, as shown in the following figure. Generally speaking, there are no files we want to deal with in this directory, so we probably need to jump to another directory, such as C disk root directory, at this time, we need to use cd to jump to the directory: cd c:\.
The full name of cd is Change Directory, which literally translates to change the folder, which means to jump to the directory and change the path. It can be followed by a drive symbol, a full path and a relative path. As can be seen from its full name, it cannot manipulate files, but can only act on drives or folders. For example, if we use the command cd c:\ boot.ini to jump (boot.ini is a file, not a folder), there will be an "invalid directory name" error, as shown in the following figure.
To jump to the root of the current directory, you can use a simple command: cd\. This is shown in the following figure.
Continue to jump, cd c:\ windows\ temp, to the temporary directory.
At this point, if you want to go back to the previous directory windows, you can use this command: cd... This is shown in the following figure.
Think about it, if you execute cd. What's going to happen?
As a result, the directory did not jump and stayed where it was. This is shown in the following figure. Using this principle, you can use cd. > test.txt to construct a 0-byte text file. For details, please refer to this article: the second point of my commonly used batch processing skills. Http://bbs.bathome.cn/viewthread.php?tid=939
It turns out that in cmd,. And\ denote relative paths. It is the current directory. Is the upper level directory, and\ represents the root directory.
Let's take a look at a rather strange phenomenon:
When you jump from the current directory to a different partition path d:\, cd d:\ does not succeed, the current directory does not change; when a parameter / d is added, the command executes successfully. It turns out that when you want to jump to a different partition, you need to add the forced jump parameter / d. However, if you are entering a subdirectory of the current directory, you can not use the / d parameter. This point is easy to be ignored by everyone, and I hope it can attract enough attention.
Let's take a look at an even weirder phenomenon:
Originally, when the current drive letter + colon is entered, the full path of the current directory will be displayed; when the current drive letter + colon + backslash is entered, it will jump to the root of the current path.
Another very valuable use of CD is to display the current full path, usually referenced through% cd%. This is shown in the following figure. At this point, CD makes a Current Directory interpretation, that is, "current folder".
Thank you for reading this article carefully. I hope the article "how to achieve directory jump in dos" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.