Common DOS commands

Source: Internet
Author: User

MS DOS Command Daquan

First, the basic command
1 dir
No parameters: View the files and folders that are currently in your directory.
/s: View the files and folders for which the current directory has all its subdirectories.
/A: View all files that include hidden files.
/ah: Only hidden files are displayed.
/w: Displays files and folders in a compact way (5 files on one line).
/p: Displayed as paging (automatically pausing after a page is displayed).
|more: The preceding symbol is "\" The one above, called the redirect symbol, is to put a
The result of the command is output as a parameter to another command. More is also an order, dir/w |more
The result is the same as the result of dir/w/p.
Other parameters you can use: dir/? view.

2 CD
CD Directory Name: Enter a specific directory. If you see a directory displayed as: ABCdef ghi
Input: Cdabcdef.ghi into the directory.
Cd\ back to the root directory.
Cd.. Go back to the top level directory.

3 MD Rd
MD Directory Name: Create a specific folder. (Dos under the habit called Directory, win under the custom called the text
Folder. Oh! )
RD Directory Name: Deletes a specific folder.

4 CLS
Clear the screen.

5 copy
Copy path \ filename path \ filename: Copy a file to another location.

6 move
Move path \ filename path \ filename: Move a file (cut + copy) to another
A place.

7 del
del file name: Deletes a file.
Del * *: Deletes all files under the current folder.
Del cannot delete a folder.

8 deltree
Delete the folder and all the subfolders underneath it there are also files, bad ... Don't mess with it.

9 format
Format x:: x represents the drive letter, formatting a partition. The FAT file system format is used under DOS
When Windows2000 is installed, you will be asked to convert to NTFS.

Ten type
Type text filename: Displays the contents of the text file.

Edit
In fact, this is a small program, editing text files with.

ren
ren old filename New file name: Change the file name.

Second, about the network of common commands
1 Ping
Ping host IP or name: Send 4 ICMP packets to the target host to test if the host is receiving
and response, usually used to do the normal network is smooth test. But Ping does not represent the net
It is possible that the target host has a firewall and has blocked the ICMP response.
PING-T: Sending packets continuously. Of course, they are small, and they cannot be called attacks. Some people write their own
A program that resembles a ping command that sends a large packet of packets to block the target host
Network connection.

2 Net
The recommendation is to use NET/? To obtain specific help information. There are a lot of parameters, the parameters below are also
Number. Commonly used: NET view \ \ Hosts look at sharing, net Start/stop services to start and stop
Service, Messenger Service personal not very much.

3 netstat
Netstat host: View the status of the host's current TCP/IP connection, such as the port.

4 nbtstat
Nbtstat host: View the NetBIOS name used by the host.

5 tracert
Tracert Host: View the path from your own to the target machine. Such as:
Tracert www.ncie.gov.cn then wait ... You'll see the routing section you passed.
Point, generally larger routers, such as telecommunications trunk roads, in addition to IP, are marked in English
Of

6 Pathping
Pathping Host: Similar to tracert, but can display some tracert cannot display the letter
Interest. You can try it yourself.

7 FTP
The character way of FTP, I like to use;) do not install CuteFTP.

8 Telnet
The remote login program of character mode is a remote login program which is extremely loved by network personnel. I've often
Used to debug a mail server.

9 ipconfig very useful network configuration, troubleshooting ... Command.
Displays the current machine's network interface status without parameters.
/ALL first the detailed information.
/release releases the current IP.
/renew re-apply for IP.
/flushdns refreshes the DNS cache.
/registerdns the DNS server to register itself.
。。。。。。

ARP to operate the current ARP cache.
-a displays the ARP cache.
-D Deletes a cache record.
-S Tian a cache record.

One nslookup to exclude DNS errors. is an interactive tool. Before using it, try to figure out what DNS does and how DNS works.

xcopy is an external command, that is, a small program, sometimes found on the floppy disk, there is no hard disk ... Faint... Of course the courage to make it better than copy, I like the Add/E parameter.
Smartdrv.exe load the disk cache, the parameter is the size of the cache, in kilobytes.
such as: Smartdrv 32768 is the load 32M cache.
The role of caching is obvious when you install Win2K! No cache loading Win2K Pro takes about 3 hours, after loading 8M cache, as long as 30 minutes.
The principle is that an area is partitioned in memory, and the data on the hard disk is continuously read into that cache area during installation, making full use of the memory.

At is the same as the task plan.
Here's how to use it, and you can get help by typing it at the command prompt: AT/.

The AT command schedules commands and programs to run on a specific date and time.
To use the AT command, the scheduling service must already be running.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at [\\computername] [[ID] [/delete] |/delete [/YES]]
at [\\computername] time [/interactive]
[/every:date[,...] |/next:date[,...]] "Command"

\\COMPUTERNAME Specifies the remote computer. If this argument is omitted, the command is scheduled to run on the local computer.
\\127.0.0.1 represents the local machine. And does not add to this parameter the same meaning.

ID is assigned to the identification number of the scheduled command.
Used to identify tasks, such as you want to add several tasks, id=1 on behalf of the first!

/delete deletes a scheduled command. If the ID is omitted,
All scheduled commands on the computer will be deleted.
/yes no further confirmation is required, follow the removal of all jobs
commands to use together.
TIME specifies when the command is run.
/interactive allows jobs to run at runtime, with users logged on at the time
Desktop for interaction.
/every:date[,...] Run the command every month or week on the specified date.
If the date is omitted, the default is to run on the current day of the month.
/next:date[,...] Specifies that the command be run on the next specified date (for example, next Thursday).
If the date is omitted, the default is to run on the current day of the month.
"Command" Prepares the Windows NT command or batch program to run.

Common DOS commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.