DOS script (3)

Source: Internet
Author: User
Tags clear screen

Lesson 1: DOS Re-learning!
MS-DoS (disk operating system) DISK OPERATING SYSTEM
DOS core boot programs include boot system boot programs, Io. sys, msdos. sys, and command. com. They are the most basic components of the DOS system, and can be started with their systems.
-------------------------------------------------------
File Size: byte (byte) kb md gb Tb (note Chinese characters have full and half width .)
Bit 0/1; 8 * bit = 1 byte = byte; 1 Chinese Character = 2B; 1kb = 1024b; 1 MB = 1024kb; 1 GB = 1024 MB; 1 TB = 1024 GB
-------------------------------------------------------
Categories of DoS Files:
EXE executable program file
COM executable command file
Bat executable batch file
Dat Data File
TXT text file
Bak backup file
Sys System File

Why do I need to learn dos?
(1) have a better understanding of the underlying computer layer.
(2) DoS is the only way for computer experts (BiOS upgrade, multi-system installation, hard disk repair, and clear CMOS passwords ).
(3) Windows is developed from DOS, and many problems need to be solved under DOS. To solve these problems, it is necessary to learn dos knowledge.
(4) programming needs.

-------------------------------------------------------
What is an internal command and what is an external command.
-------------------------------------------------------
Wildcard: * and?
* -- Represents Multiple Arbitrary characters in the file name (Extension.
? -- Represents a valid arbitrary character in the file name (Extension.
-------------------------------------------------------

1. What is the difference between .comand. bat of External commands?
. Com/. EXE/. Bat are executable files of the Microsoft operating system.
. The data zone and code zone of COM files are limited. The maximum size of COM files cannot exceed 64 KB. Therefore, COM is relatively small and the execution speed is fast. In the memory, it is completely a code image. It is the instruction program that contains only one code segment. Only some simple DOS commands can be performed on files.
. EXE files can contain multiple program segments, such as code segments, data segments, and stack segments. EXE files are widely used and can be used as program files for various programs.
-------------------------------------------------------
. Bat first processes a file in batches as a text file. each line of the CMD file is a DOS command (most of the time it is like the command line we run at the DOS prompt), which is executable and can be called an executable file. The bat file is interpreted and analyzed by command.com, and 2.3 executable programs are called according to the priority order of the content. One row is analyzed and one row is executed, and the file itself is not loaded into the memory.
-------------------------------------------------------
The execution efficiency of COM is higher than that of exe.
When there are three files with the same name, namely a.bat,a.com,a.exe
When entering C:/
Execute the following command: a.bat,a.com,a.exe

Doscommand:
I. Directory operation command:
Concept: What is Directory: Directory = folder
1. dir command: displays files and subdirectories in a directory.
/AD: displays the list of subdirectories in the current directory;
/AH: displays the files and directories with hidden attributes in the current directory.
/As: displays the files with system attributes in the current directory.
/P: display the search result on the split screen;
/W: display the search result on a wide screen
/S: Find all files and folders in the current directory and subdirectory;
* Dir command tips:
1, Dir | more: displays the Dir result list row by row;
2. dir> TT. txt: print the dircommand to the tt.txt file.
2. CD command: change the current directory
3. md command: create a directory
4. RD command: Delete the directory (the directory to be deleted must be an empty directory)
5. Tree: displays files and subdirectories in a directory.
6. Ren: directory/file renaming command
7. * SUBST Associates the path with a drive letter.

2. system commands:
1, time: displays the current time.
2, Date: Date
3. Ver: operating system version
4, CLS: clear screen
5. Exit the cmd. exe program (command interpreter ).
6. Help: Help
7. Prompt changes the DOS system prompt command

 

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.