java basics 01: dos command

**

Dos command

(1) Operate the directory
d: Enter the root directory of
the d drive md dir1 Generate the dir1 folder under the d drive directory
rd dir1 Delete the empty dir1 directory under the d drive
cd dir1 Cut into the dir1 directory
cd dir1 \ dir2 \ dir3 Once enter Multi-level directory
cd… Back to the upper directory
cd / Change to the current drive letter root directory
dir Show all files and folders under the current folder

(2) Operate on the file (the file format can be other formats, the following is explained with txt)
cd.> Cc.txt Generate cc.txt file in the current directory
echo helloword> cc.txt Write hello to the current directory cc
cc.txt in the .txt folder directly opens the cc.txt file, and the
type cc.txt will be opened in Notepad. In the cmd window, the content of
cc.txt will be displayed del cc.txt Delete the cc.txt file in the current directory

(3) Delete the folder and the files in the folder, there are two steps:
del d: \ dir *. * Delete all files under dir instead of folders
Insert picture description here

② rd / sd: \ dir
Insert picture description here

(4) Other commands
ipconfig View ip
netstat -ano View all port occupancy
netstat -aon | findstr "8080" Only view the process id occupying port 8080
exit Exit cmd black window
cls Clear screen
ping www.baidu.com -t> cc.txt outputs the extended package of the ping command to cc.txt in the current folder, ctrl + c can exit the above ping command

The command address: https://www.cnblogs.com/hongten/archive/2013/03/27/hongten_windows_cms.html

Published 4 original articles · Likes2 · Visits 199

Guess you like

Origin blog.csdn.net/ghity123/article/details/105430851