In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article shares with you the content of an example analysis of directory class commands in the CMD command. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
(1) set up a subdirectory in MD--
1. Function: create a new subdirectory
2. Type: internal command
3. Format: MD [drive letter:] [path name] < subdirectory name >
4. Instructions for use:
(1) "disk letter": specifies the letter of the disk drive to create a subdirectory. If omitted, it is the current drive.
(2) "path name": the parent directory name of the subdirectory to be created, which is created under the current directory by default.
Example: (1) create a subdirectory called FOX under the root directory of C disk; (2) create a USER subdirectory under the FOX subdirectory.
C:, > MD FOX (create a subdirectory FOX under the current drive C)
C:, > MD FOX, USER (create a USER subdirectory under the FOX subdirectory)
(2) CD-- changes the current directory
1. Function: display the current directory
2. Type: internal command
3. Format: CD [drive letter:] [path name] [subdirectory name]
4. Instructions for use:
(1) if the path and subdirectory name are omitted, the current directory is displayed.
(2) if you use the format "CD,", return to the root directory
(3) if "CD." The format is returned to the previous directory.
Example: (1) enter the user subdirectory; (2) return from the user subdirectory to the subdirectory; (3) return to the root directory.
C:, > CD FOX, USER (go to the user subdirectory under the Fox subdirectory)
C:, FOX, USER > CD. (return to the previous root directory)
C:, FOX > CD, (return to root directory)
C:, >
(3) RD-- delete subdirectory command
1. Function: the directory is deleted from the specified disk.
2. Type: internal command
3. Format: RD [drive letter:] [path name] [subdirectory name]
4. Instructions for use:
(1) the subdirectory must be empty before deletion, that is, you need to enter the subdirectory, delete the files under its subdirectory using DEL (command to delete files), and then return to the above.
First-level directory, delete the directory itself with the RD command
(2) the root directory and current directory cannot be deleted.
For example, delete the user subdirectory under the FOX subdirectory of disk C, as follows:
Step 1: delete the files in the user subdirectory first
C, > DEL C:, FOX, USER, *. *
The second step is to delete the user subdirectory.
C, > RD C:, FOX, USER
(4) DIR-- display disk directory command
1. Function: display the contents of the disk directory.
2. Type: internal command
3. Format: DIR [drive letter] [path] [/ W]
4. Instructions for use: the use of / P; when there are too many directories to view and cannot be displayed on one screen, the screen will scroll up all the time, so it is not easy to read clearly. After adding the / P parameter, 23 lines of file information will be displayed on the screen at a time, then paused and prompted; Press any key to continue
The use of / W: add / W to show only the file name, omitting the file size and the date and time it was created. With parameters added, five file names can be displayed on each line.
(5) PATH-- path setting command
1. Function: the search path for device executable files, valid only for files.
2. Type: internal command
3. Format: PATH [drive letter 1] directory [path name 1] {[; disk letter 2:], < directory path name 2 >... }
4. Instructions for use:
(1) when running an executable file, DOS will first search the current directory for the file and run it if it is found. If the file cannot be found, it will search the directory one by one according to the path set by the PATH command.
(2) if there are more than two paths in the PATH command, each path is separated by a semicolon.
(3) there are three ways to use the PATH command:
PATH [drive letter 1:] [path 1] [drive letter 2:] [path 2]... (set the search path for executable files)
PATH: (cancel all paths)
PATH: (show the currently set path)
(6) TREE-- display disk directory structure command
1. Function: displays all directory paths on the specified drive and all file names under these directories.
2. Type: external command
3. Format: TREE [drive letter:] [/ F] ["PRN]
4. Instructions for use:
(1) when the / F parameter is used, all directories and all files under the directory are displayed. When omitted, only the directory is displayed, not the files under the directory.
(2) when the > PRN parameter is selected, the listed directory and the file name in the directory are printed out.
(7) DELTREE-- command to delete the entire directory
1. Function: delete the entire directory and its subdirectories and files.
2. Type: external command
3. Format: DELTREE [drive letter:] < path name >
4. Instructions for use: this command can delete the directory and all its files, subdirectories, and lower-level subdirectories in one step, regardless of whether the attribute of the file is hidden, system, or read-only.
As long as the file is under the deleted directory, DELTREE will treat it equally and delete it. Be careful when using it
Thank you for reading! This is the end of this article on "sample analysis of directory commands in CMD commands". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out 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.
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.