Practical commands and operating skills in Windows XP

  
        When you want to enter a repeat command in the command prompt window, just press the F7 key, a graphical interface will appear, and then you can select the command you want to enter. A "fu" An Tian uses a command prompt to solve system problems. One day, I watched a movie. There is an old Taoist in the movie. Just draw a character and let the villagers avoid the monsters. It is the magical painting of the old Taoist. I am amazed at it. This reminds me of a word in Windows - the command prompt. Even today, the DOS commands in the command prompt have long been forgotten by many people. However, during the actual computer operation, the command prompt is still infinitely vibrant. More and more people already know how to solve some operations that can't be done in Windows at the command prompt. This article will help beginners who are new to this game to quickly master how to use it. Then you will also become the boundless Taoist priest in the movie. First, the first command prompt From Windows 2000, MS-DOS has been renamed "command prompt", become an application of Windows, its operating environment is also limited by the system. When you open "Run", enter "cmd" and press Enter to open a command prompt window. We can execute the relevant commands as in pure DOS, and press Alt+Enter to switch between full screens/windows. There are many commands at the command prompt. Generally, they are divided into internal commands and external commands. Internal commands are loaded into the memory with command.com. You do not need to read the files and can use them directly. External commands need to be used in advance. A program that is loaded into memory by a disk device and has a COM and EXE extension. This article will introduce some useful command applications and operations using a command prompt in Windows XP. Second, the basics: use the command prompt command 1. Directory conversion is not tiring CD command is a command to change the directory, is one of the most commonly used commands. For example, if we want to enter the subdirectory named ABC in the current XYZ directory, then just execute "CD ABC". If you want to return to the XYZ parent directory, just execute the "CD.." command, if you want to be in "C: In the \\>" state, go to the ABC directory at once, then just execute the "CD XYZ \\ABC" command. If you want to return the root directory from a very "deep" directory path, then we do not need to execute the "CD.." command step by step, just execute the "CD\\" command. Tip: If you want to change the current disk drive letter, for example, you want to go to the root directory of the D drive from the "C:\\Windows\\SYSTEM32" command prompt, you need to execute the "D:" command, and if you want to go to the G drive , then just execute the "G:" command and then use the CD command to change the current directory path. 2. Flexible display of directories and files The Dir command can be said to be one of the most used commands. Its function is to display all files and subdirectories in a directory by default, and also displays the volume of the drive where the directory is located. The serial number of the label and the volume. To do this, type "dir" directly at the command prompt and press Enter (the characters in the command prompt are not case-sensitive). (1) Pagination display If there are so many files and subfolders in the directory to be displayed, you will often not see some files. You can use the parameter "/p" to view the contents of a window. Press any key again to jump to the next window until all is displayed. Tip: If you add the parameter "/w", the displayed content will directly display the file name in the form of a column, and the date and time and size of the file or folder creation will not be displayed. The ones with the "[]" are represented as subdirectories, and the rest are files. (2) Peeping your hidden files By default, if you only use the dir command without any parameters, then all hidden items will not be displayed. If you use the dir /a command, all hidden items will be displayed. If you only want to show hidden items, you can use the dir /a:H command (Figure 1, H for hidden attributes). In addition, the attribute value of the file or folder can also use "D" to indicate the directory, "R" for read-only, "A" for the file to be archived, and "S" for the system file, if "-" is added before the above value "No. If you only want to display non-read-only files or folders, use the dir /a:-R command. Figure 1 (3) classification display In the search process, we can use the parameter "/O" to make the files display in a certain order, for example, in alphabetical order of extensions, then you can be behind "/O" Add the parameter "E" and the command form is "dir /O:E". In addition, "N" is followed by "N" for display by name, "S" for display by file size, "D" for display by date and time, and "G" for group directory priority display, if each Adding "-" before the value is the opposite of the sort order. Hint: Dir supports wildcard lookups. For example, to find all files with the extension doc, just execute the "DIR *.DOC" command. "*.*" means all files; "a?b.*" means that the file name consists of three characters, the first character is "a", the last character is "b", and the middle is any character, expansion Named an arbitrary file. 3. Change the status of the command prompt. By default, the status of the command prompt is "Current System Disk\\Documents and Settings\\ Current User Name". If you want to open a command prompt, you can enter "Windows\\system32". In the state, you can set it as follows: Click “Start→Control Panel→Performance and Maintenance→Administrative Tools→Computer Management”, and then expand “System Tools→ in the left window of “Computer Management”. Local Users and Groups→Users, then double-click the currently logged in user name in the right window, click the Profile tab in the opened Properties dialog box, and then under Local Folders In the Path text box, type the current drive letter or current directory you want to change, such as "C:\\Windows\\system32" (Figure 2), and finally click "Apply → OK" and restart your computer. Figure 2 III. Application: Command prompt to solve system problems 1. Repair damaged system files In the process of operating the computer, we may lose some important system files due to some misoperation, so the system becomes very Unstable, there is always an error message. If you reinstall the system for this, it will waste you a long time. In fact, you can easily detect and repair damaged system files by using the SFC file detector command. . To do this, insert the system installation CD, then type "sfc /scannow" in the command prompt window and press Enter. The sfc file detector will immediately scan all protected system files. In about a few minutes, SFC will detect and repair protected system files. Tip: If you don't have a Windows XP installation disk, but you have previously backed up the installation disk file on your hard disk, you can use the following small settings to let the file detector recover the system files from the installation files on the hard disk. Expand the "HKEY_LOCAL_MacHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup" subkey in the registry, and then modify the Installation Sources, ServicePackSourcePath, and SourcePath key values ​​in the right window to the system installer path on the hard disk, such as Windows XP. The installation original file is stored in the E disk\\CDXP folder, then the key value of the above three keys is modified as "E:\\CDXP". When you use the SFC command again, you can use the installation files on the hard disk to restore the system without inserting the installation CD. 2. Three swords killing the Trojan virus Nowadays, some Trojan viruses use many new technologies, which makes us hard to prevent. However, the general anti-virus software can only detect but can not kill these latest Trojan viruses because of these Trojan viruses. The process is well hidden. The Trojan virus process cannot be ended in the usual way and the Trojan virus program has a strong self-copy protection function. At this point we can use the tasklist, taskkill and Del commands at the command prompt to kill the Trojan. First execute the "tasklist /v" command at the command prompt. At this time, the system will display the details of all currently running processes (only brief information will be displayed without any parameters). The display content includes image name, user name, PID, Session and memory usage (Figure 3), if you find that the Trojan virus process is a.exe, and its corresponding PID value is X, then you can execute "taskkill /f /t a.exe" or "taskkill /f" X" to end the process, where the parameter "/f" means to force the end of the process, which is more effective for those stubborn processes, and finally execute "Del a.exe" under the Windows Recovery Console to completely remove the Trojan virus. Figure 3 Tip: Execute "tasklist /svc" to display the service corresponding to each process, which will help us to view suspicious services. In addition, you can view and kill the hacking process on the remote computer. For example, the IP of the remote computer is 192.168.0.55, the user login name and password are “zla169” and “123456” respectively, then execute “tasklist /s 192.168.0.55 /u zla169 /p 123456" to view the process running on the remote computer, execute "taskkill /s 192.168.0.55 /u zla169 /p 123456 /f /t a.exe" to force the process name on the remote computer to be a.exe process. 3. Paste the "death and death" process for the process of killing. Sometimes you encounter a "funny" process, even the usual process manager can not kill it. At this point, we can use the command prompt to put a life and death symbol on it to subdue it. The first step: open the process manager window, and then find the process that even the process manager can not kill, if the current process manager's "process" column can not find the process's "PID (process identifier)" , in the "Processes" tab of the Task Manager, click on the menu "View → Select Columns" and select the "PID (Process Marker)" item. Finally, the process flag of the process is found. Step 2: Enter ntsd -c q -p PID to return to the process. Only the System, SMSS.EXE, and CSRSS.EXE processes cannot be killed by this command. The first two are purely kernel-mode, and the last one is the Win32 subsystem, which is required by ntsd itself. Tip: If the parameters of a command prompt are not clear, you can enter this command and add "/?" at the back to enter. For example, if we want to view the parameters of the "cmd" command, just type "cmd /?". There is a saying in Bibi: There are many commands in the Windows command prompt. We can view all the internal commands by executing the "help" command at the command prompt. For each command, for example, for the COPY command, we can use the "COPY /?" method to see its approximate usage.
Copyright © Windows knowledge All Rights Reserved