Command line
The command line is a widely used interface before the graphical interface, and some people say things about the character user interface. Now that most of you are accustomed to using the graphical interface, there is little to know about the command line, let's look at the simple use of the command line (under Windows system):
To understand the command line, the first concept to understand is the file system, the concept of the file we all know, but the file needs to be stored in a specific location, for the description of this location, we have the absolute path and the relative path of two representations:
Absolute path: Is the path that starts with the drive letter, just like C:\Users\Administrator\Desktop\QQ.exe this is the absolute path of your desktop QQ
Relative path: Is the path starting from the current path, assuming your current path is C:\Users\Administrator the relative path of your QQ is. \desktop\qq.exe
The second concept to understand is the process: a process is an entity that the program is executing, consumes CPU resources and consumes memory. For each process the system assigns a number (PID) to it.
We can enter the CMD run interface, enter the command tesklist, you can query the current process as a list, if you want to terminate one of the processes can be terminated with the Teskkill/pid <PID> command. If a process is not normally terminated, or the system behaves abnormally, such as running slowly, it is necessary to check the process, we need to execute a program just enter the program name directly.
Some of our common commands are:
Clock ()/(double) Clocks_per_sec calculates the time we write the program, writes the printout at the end of the program
Dir queries the list of files in the current directory
Cd/md/rd changing, creating, and deleting directories
Type/more displaying file contents
FC Compare file contents
attrib modifying file properties
Copy/del Deleting files
Find string in file
For the program we have written, we can use the first command to test the time of the run, we use Freopen to generate output files, you can use Dir to find the location of the file, directly display the contents of the file (after habit than with the mouse faster); FC will use more, such as the program output more content, directly can be used FC 1.txt 2.txt Compare your own output and the output of the topic what is the difference; attrib can set whether the file property is read-only (R), suppressed (h), System file (s), archive (a).
Of course, there are more commands than these, and other commands are not often used, as shown below, which are sometimes used:
Logoff Logoff
Mscongfig System Configuration Utility (can turn off boot program)
Nslookup IP Address detector
Shutdown timer shutdown
Defrag defragmentation
Simple use of the command line