Common DOS commands
Select the start → Run command, enter CMD, and click the OK button. A window appears at the command prompt. He is a command interpreter in the Windows system. "C:\>" is called the command prompt, which contains the name of the disk currently in use, such as we use the C drive, D disk, etc., at the flashing cursor can enter a variety of DOS commands, press ENTER to execute these commands.
Note: In these DOS command syntax listed on the line, all the parts of "[]" and "<>" are called parameters, the parameters in "[]" are optional, the parameters in "<>" are required, and different parameters cause different effects for the command.
1. cd
This command is used to change the current directory.
Grammar:
CD [Drive letter:] [pathname] [subdirectory name]
In the Command Prompt window, the position of the cursor prompts you where you are now, and the current position. For example
C:\>_
The flashing cursor tells you "is now located under the C packing directory." If you enter a command at the cursor:
CD c:\windows
When you press the ENTER key, you see the following result:
C + Windows>_
This is your current location under the C-packing directory under the Windows folder.
Using the CD command, we can change the current directory at will, from a directory into its subdirectories or back to the previous level of the directory. Here are two special directories: "\" and "..", and enter the following commands:
C:\Program FILES\JAVA\JDK1.6.0_01>CD.
C:\Program files\java>cd\
C:\>d:
D:\>
Where, "CD.." Return to the previous level of the directory, "cd\" refers to the return to the root directory. The "D:" value is switched to the D disk. After these operations, we switched from the C:\Program files\javajdk1.6.0_01 directory to the D-packing directory.
Note: In fact, there are two ways to describe a path when representing the location of a file or folder. One is an absolute path and the other is a relative path. Here "C:\Windows" is the absolute path of the Windows folder, which is written from the drive letter. Sometimes, for simplicity, a relative path can be used to describe it. As the name implies, the relative path is the path relative to the current position. So, here we can also write it as "CD windows". For beginners, you can first use the absolute path to describe, familiar with, and then slowly understand the relative path of writing.
2, dir is the directory (directory) abbreviation. This command displays subdirectories and files under a directory.
Grammar:
dir [disk symbol:] [directory path][/p][/s][/w][/o]
Use the dir command to display files and folders under the specified directory, as well as other more detailed information, including file size, creation date and time, and so on. You can control the format of the output and output by adding different parameters to the command.
/P: Indicates that the displayed information will be paused when the screen is full, and you can press any key to view the next screen.
/s: Indicates that a list of all files in the current directory and its subdirectories is displayed.
/w: Indicates that the file name in the current directory is displayed as a wide list.
/o: Indicates that the file is displayed in sorted order.
3. MD
This command is used to create a new directory.
Grammar:
md [Drive letter:] [pathname]< folder name >
The path name indicates the directory and path that will be created, and the folder name must be a parameter. For example: To create 3 folders on the D drive, enter the following command:
D:\>MD MyFile
D:\>MD Mypic
D:\>MD Backup
D:\>
Because the current directory is the D packing directory, the command "MD myFile" means to create a folder under the D-Packing directory, and the folder name is "MyFile".
4. Edit
Set up the directory, you can create the A.txt file below. Use the edit command to complete this function. The edit command opens a simple editing software that we can use to edit some programs and batch files.
Grammar:
Edit [Drive letter:] [pathname] [filename]
For example, to create a a.txt in the MyFile folder, enter the following command:
D:\>CD MyFile
D:\myfile>edit A.txt
D:\myfile>type A.txt
This is my file.
D:\myfile>
Output "Edit A.txt" Press the ENTER key to display the editing window shown on the way.
Enter the text at the cursor prompt, then open the File menu (open with the shortcut key alt+f), and select the Save command. After you choose the Exit command, you can view the contents of the file by using "type A.txt".
Note: Use the shortcut key "ALT + menu item initials" To open the corresponding menu item.
5. Copy
The command copies one or a set of files to the specified disk or directory.
Grammar:
Copy < source file path >[target path]
Now we are using this copy command to copy the A.txt file that you just created in the MyFile folder to the backup folder, and enter the following command:
D:\myfile>copy a.txt D:\backup
1 file<s> copied
D:\myfile>
The copy command copies only the files and copies one or a set of source files to the destination path. If no destination path is written, the file is copied to the current directory.
Figure 6.5
→myfile→a.txt
D:→→mypic
→backup→a.txt
The directory structure after the change is as follows
Figure 6.12
→file
d:→
→mypic→a.txt
Comparing figures 6.5 and 6.12, it is not difficult to see that we need to delete the backup folder, then move the A.txt file in the MyFile folder to the Mypic folder and rename the MyFile folder to file. In order to resolve these issues, the following DOS command is required.
6. Rd
This command is used to delete a directory
Grammar:
RD [Drive letter:] [pathname]< subdirectory name >
After Rd, write the name of the directory you want to delete. The use of this command is to note that the deleted directory must be empty. Therefore, we need to delete the files in the backup folder first by using the following del command before deleting the backup folder.
7, Del
This command is used to delete one or a set of files in a directory.
Grammar:
del [Drive letter:] [pathname]< filename >
Here, "*" is called a wildcard character, which indicates "all". Therefore, the command "del d:\backup\*" means deleting all files under the backup folder. It is important to note that you must be careful when using the Del command, because once deleted, it will not be easy to recover.
8. Move
This command moves the file or directory from one location to another.
Grammar:
Move < source file path >[target path]
Now enter the move command to move the A.txt file from the MyFile folder to the Mypic folder, and enter the following command:
D:\>move D:\myFile\a.txt D:\myPic
1 file (s) moved.
D:\>dir MyFile
Volume in Drive D have no label.
Volume Serial number is 78b6-771f
Directory of D:\myFile
2007-10-18 18:38 <DIR>.
2007-10-18 18:38 <DIR>.
0 File (s) 0 bytes
2 Dir (s) 12,932,849,664 bytes free
The most important difference between the move command and the Copy command is that the move command removes the file from the source location. So, when we execute the move command, after looking at the MyFile folder, you will find that myfile is empty.
9. ren
This command is used to change the name of a file or group of files in a directory.
Grammar:
ren [drive:] [path]< old file name >< new file name >
This command is simple, execute the following command to rename the MyFile folder, enter the following command:
D:\>ren MyFile File
D:\>_
10. CLS
Use the CLS command to clean up the screen!
In addition, DOS can also help us to implement the operation of the disk. For example, disk formatting and disk partitioning. Users need to use programs to partition and format the disks before the computer can use them to store data. For a disk that is being used, the format operation will completely empty the data on the disk, just like wiping the blackboard with a full word. In an image analogy, partitioning is like drawing a generous box on a blank sheet of paper, and formatting is like playing a lattice in a box, storing data as if writing in a grid. Partitioning and formatting serve as a marker for the computer to store data on disk. Partitioning and formatting the commands we use are the FDISK command (hard disk partition) and the Format command (format).
Grammar:
format [disk character]
Fdisk
Expansion: Use DOS commands to partition and format the hard disk of a newly assembled computer, the main steps are described below.
First step: Prepare before partitioning. Boot the system using the boot disk (windows98/me boot CD), enter the DOS system after entering the "fdisk" command at the prompt to press ENTER to execute, the screen will appear a large section of English message, the last line "Do you wish to enable large disk Support (y/n)? " Ask the user if they want to use the large hard drive mode, you need to enter "Y" here.
Step Two: Create the partition. Establish the primary partition once → set up the extended partition.
After entering the Fdisk main interface, you will see the following 4 options.
(1) Create DOS partition or Logical DOS Drive: Creates DOS partitions or logical drives.
(2) Set active partition: Sets the active partition.
(3) Delete partition or logical DOS drive: Delete partitions or logical drives.
(4) Display partition information: Displays the partition information.
We are here a new non-partitioned hard drive, so choose to press ENTER, you will see a brand-new window, according to the prompt to select "Create Primary DOS Partition", the program will automatically generate the drive letter (C:). Then press ESC to go back to the previous interface, select "Create Extended DOS Partition", and the program will set one or more logical disks based on the extended partition size and actual needs set by the user (the program automatically assigns the drive letter D:, E:, etc.).
Step three: Activate the primary partition. If an extended partition is established, the primary partition must be activated or the hard drive will not boot the system at a later time. On the FDISK main Menu select "Set active partition (set active partition)", the screen will display all the partitions on the hard disk for the user to select, of course, we want to select the primary partition to activate, and then return to the Fdisk main menu.
Fourth step: Format the disk. Pressing the ESC key to exit to the screen prompts the user to restart the system. After rebooting the system, execute the Format command, and sequence the already established logical disk (C:, D:, etc.).
Note: If you need additional commands in your application, you can use the Help command to query. It provides help information, the syntax is as follows.
Help [command]
For example, if you enter "Help", all commands and their functions will be displayed; He is a good helper for you to use DOS commands.
Use the Ctrl+space shortcut key in the Command prompt window to open the Chinese input method system.
Tips:
(1) There are two ways to use the Edit text editor.
A, enter the "Edit file name" (Note: Do not forget the file extension), after editing select "File" → "save" command, after saving the file, select "" File "→" exit "command to exit the program.
B, enter "edit", edit in the open editor, then select "File" → "save" command, enter the file name in the Open dialog box, then select "OK" button to exit.
(2) View the command details as follows:
Help
Help move
Move/?
The DOS operating system uses the FAT16 file system, which is now used by the Windows operating system with the FAT32 or NTFS file system.
Common shortcut keys.
(1) Open a Word document, select all the contents of the document, and then undo.
Solution: Ctrl + A (select all), CTRL + Z (undo).
(2) Open a number of windows, such as Word window, QQ window, IE and so on. Now you want to switch from one window to another window.
Solution: ALT + TAB (toggle window).
(3) Quickly close the multiple windows you just opened.
Solution: Alt+f4 (Close the current window).
(4) You want to quickly zoom in or out of a Word document or page.
Solution: Ctrl + Rotate the mouse wheel (zoom in).
(5) You want to lock your computer when you leave your computer, modify your computer's logon password, and see how your computer is running.
Solution: Ctrl+alt+delete (Open the Windows Security dialog box, click the appropriate button to set it).
(6) The mouse is broken, want to use the keyboard instead of the mouse.
Solution: Windows Key (opens Start menu), text key (instead of right mouse button).
Tips:
In the command Prompt window, you can set the text Quick Edit feature. The setup steps are as follows.
(1) Right-click the title bar of the command Prompt window and select the "Properties" command from the drop-down menu that appears.
(2) Select the Options Feature tab, select the Quick edit mode command in edit options, and click the OK button.
Once set, you can quickly copy and paste text in the Command Prompt window, as follows.
(1) Press and hold the left mouse button to select the text content in the command Prompt window, then click on the shortcut menu to select the "Copy" command, this operation to achieve the "copy" function.
(2) Right click at the cursor prompt, select "Paste" command in the popup shortcut menu to implement "Paste" function.
Screenshot:
1. CTRL+PRTSCN Full Screen
2. ALT+PRTSCN Current Window
s1/Software Technology basic/06-operating system common skills