CMD command, Linux Command

Source: Internet
Author: User
XP. CMD command Overview

For more information about a command, enter the HELP command name.
Assoc displays or modifies file extension associations.
At is the command and program to be run on the computer.
Attrib displays or changes file attributes.
Set or clear the extended Ctrl + C check.
Cacls displays or modifies the File Access Control List (ACLs ).
Call calls this one from another batch processing program.
CD displays or changes the name of the current directory.
Chcp displays or sets the number of pages of the active code.
Chdir displays or changes the name of the current directory.
Chkdsk checks the disk and displays the status report.
CHKNTFS Displays or modifies the boot time disk check.
CLS clears the screen.
CMD opens another Windows Command Interpreter window.
Color sets the default console foreground and background color.
Comp compares the content of two or two sets of files.
COMPACT Displays or changes the compression of files on NTFS partitions.
CONVERT Converts a fat volume to NTFS. You cannot convert
Current Drive.
COPY Copies at least one file to another location.
Date: displays or sets the date.
Del deletes at least one file.
DIR Displays files and subdirectories in a directory.
Diskcomp compares two floppy disks.
Diskcopy copies the content of one floppy disk to another.
Doskey: edit the command line, call the Windows Command, and create a macro.
ECHO Displays the message, or explicitly opens or closes the command.
Endlocal ends the localization of Environment Changes in the batch file.
Erase deletes at least one file.
Exit to exit the cmd. exe program (command interpreter ).
FC compares two or two sets of files and displays
Different Places.
Find searches for text strings in the file.
Findstr searches for strings in the file.
For runs a specified command for each file in a set of files.
Format the disk for use with windows.
FTYPE Displays or modifies the file type associated with the file extension.
Goto direct the Windows command interpreter to a batch processing program
Is specified.
Graftabl enables Windows to display images
Extended character set.
Help provides help information for Windows commands.
If executes conditional processing in the batch processing program.
Label to create, change, or delete the volume label of a disk.
MD creates a directory.
Create a directory using mkdir.
Mode: configure the system device.
More: display a result screen at a time.
MOVE Moves the file from one directory to another.
Path: displays or sets the search path for executable files.
PAUSE Suspends processing of batch files and displays messages.
Popd restores the previous value of the current directory saved by pushd.
Print a text file.
Prompt to change the Windows command prompt.
Pushd saves the current directory and changes it.
Rd deletes the directory.
Recover restores readable information from the faulty disk.
Rem record comments in a batch file or config. sys.
Rename the file.
Rename the file.
Replace the file.
Delete the rmdir directory.
Set displays, sets, or deletes Windows environment variables.
Setlocal starts localization of Environment Changes in the batch file.
Shift changes the positions of parameters that can be replaced in a batch file.
Sort classifies input.
Start starts another window to run the specified program or command.
SUBST Associates the path with a drive letter.
Time: displays or sets the system time.
Title: Set the title of the cmd. EXE session.
Tree displays the directory structure of the drive or path in graphic mode.
Type: displays the content of a text file.
Server displays the Windows version.
Verify tells windows whether to verify that the file is correct
Write Data to the disk.
VOL Displays the volume label and serial number of the disk.
Xcopy copies the file and directory tree.

Appwiz. Cpl ------------ add and delete a program

Control userpasswords2 -------- user account settings

Cleanmgr ------- garbage collection

CMD -------------- a command prompt can be used as an attachment for Windows. Ping, convert, and other functions that cannot be used in the graphic environment must be used.

CMD ------ view the Java Virtual Machine version in JView.

Command.com ------ the call is the built-in NTVDM of the system, a DOS virtual machine. It is a virtual environment similar to Virtual PC and has little connection with the system itself. When we run the DOS program at the command prompt, it is actually automatically transferred to the NTVDM virtual machine. It has nothing to do with cmd itself.

Calc ----------- start Calculator

Chkdsk.exe ----- chkdsk disk check

Compmgmt. msc --- Computer Management

Conf ----------- Start netmeeting

Control userpasswords2 ----- user account permission settings

Devmgmt. msc --- Device Manager

Diskmgmt. msc --- disk Management Utility

Dfrg. msc ------- disk fragment Program

Drwtsn32 ------ system doctor

Dvdplay -------- start Media Player

Dxdiag ----------- DirectX diagnostic tool

Gpedit. msc ------- Group Policy Editor

Gpupdate/Target: computer/Force refresh Group Policy

Eventvwr.exe ----- Event Viewer

Explorer ------- open the Resource Manager

Logoff --------- logout command

Lusrmgr. msc ---- local users and groups

Msinfo32 --------- system information

Msconfig --------- System Configuration Utility

Net start (servicename) ---- start the service

Net stop (servicename) ----- stop the service

Notepad -------- open notepad

Nusrmgr. Cpl ------- same as control userpasswords, open the User Account Control Panel

NSLookup ------- IP address Detector

Oobe/msobe/A ---- check whether XP is activated

Perfmon. msc ---- computer performance monitoring program

Progman -------- Program Manager

Regedit ---------- Registry Editor

Regedt32 ------- Registry Editor

Regsvr32/u *. dll ---- stop DLL file running

Route print ------ view route table

Rononce-P ---- shutdown in 15 seconds

Rsop. msc ------- group policy result set

Rundll32.exe rundll32.exe % SystemRoot % system32shimgvw. dll, imageview_fullscreen ---- start a blank Windows Image and fax Viewer

Secpol. msc -------- Local Security Policy

Services. msc --- local service settings

SFC/scannow ----- start the System File Checker

Sndrec32 ------- Recorder

Taskmgr ----- Task Manager (applicable to 2000/XP/2003)

Tsshutdn ------- 60 seconds countdown shutdown command

Winchat -------- XP built-in LAN chat

Winmsd --------- system information

Winver ----- display the about Windows window

Wupdmgr ----------- Windows Update
※※※※※※※※※※※※※※※※※※※※※※※
Linux commands
Linux basic commands

Linux basic operation commands

First, we will introduce the term "console", which is a commonly seen man-machine interface using character operation interfaces, such as DOS. The console command is a command that can be run on the operating system through the character interface. For example, the doscommand is a console command. What we need to know now is the basic Console Commands based on the Linux operating system. Note that, unlike the doscommand, Linux commands (including file names and so on) are case sensitive. That is to say, if the command you entered is case insensitive, the system will not respond as expected.

Ls
This command is equivalent to the Dir command under DOS. It must be the first one I will introduce. It is also one of the most important commands in Linux console commands. The most common parameters of LS include-a-l-f.

Ls-

Linux Files. files starting with LS are regarded as hidden files and cannot be seen only by using ls commands. In addition to displaying common file names, LS-A can also display hidden files.

Ls-l (this parameter is the lowercase letter of L, not the number 1)

This command can display the file content in a long format. If you need to view more detailed file information, you need to use the LS-l command. For example, if I Type LS-l in a directory, the following information may be displayed (the top two rows are added by myself ):
Location 1 2 3 4 5 6 7
File Attribute file number the group file size to which the owner belongs file name creation date
Drwx ------ 2 guest users 1024 Nov 21 mail
-Rwx -- X 1 Root 89080 Nov 7 tar *
-Rwxr-XR-x 1 root bin 5013 Aug 15 9:32 uname *
Lrwxrwxrwx 1 Root 4 Nov 24 :30 zcat-> Gzip
-Rwxr-XR-x 1 root bin 308364 Nov 29 7:43 zsh *
-Rwsr-x --- 1 root bin 9853 Aug 15 Su *
Next, I will explain the meaning of the displayed content.
The first column indicates the attributes of the file. Linux Files are basically divided into three attributes: readable (R), writable (w), and executable (X ). However, there are ten grids that can be added here (10 bits are actually implemented in a specific program ). The first cell is a special cell, indicating a directory or a link file, etc. D indicates a directory, for example, drwx ------; L indicates a link file, for example, lrwxrwxrwx; if it is a horizontal, indicates that this is a file. The remaining grids are in the unit of 3. Because Linux is a multi-user multi-task system, a file may be used by many people at the same time, so we must set the permissions for each file, the permission positions of the files are arranged in the following order (-rwxr-XR-X is used as an example ):
Rwx (owner) r-X (Group) r-X (other)
In this example, the permissions are as follows: users are readable, writable, and executable; users in the same group are readable, writable, and executable; other users are readable, writable, and executable. In addition, the execution of some program properties is not X, but s, which indicates that the user who executes the program can temporarily execute the program with the same power as the owner. Generally, commands or programs such as System Management enable the user to have the root identity during execution.
The second column indicates the number of files. If it is a file, the number is naturally 1. If it is a directory, the number is the number of files in the directory.
The third field indicates the owner of the file or directory. If the user is currently in his/her home, this column is probably the name of his/her account.
The fourth column, indicating the group to which it belongs ). Each user can have more than one group, but most users should belong to only one group. Only when the system administrator wants to grant special permissions to a user, to another group.
The fifth column indicates the file size. The file size is represented by byte, while the empty directory is usually 1024 bytes. Of course, you can use other parameters to make the file display unit different, for example, if LS-K is used, the size unit of a file is displayed in KB. However, we generally use byte as the main unit.
The sixth column indicates the creation date. In the format of "month, day, and time", for example, Aug 15 indicates on January 1, August 15.
The seventh column indicates the file name. We can use LS-a to display hidden file names.

Ls-F (Note: F is in upper case)

This parameter is used to add symbols of the file type after a file. For example, * Indicates executable,/indicates directory, and @ indicates link file, this is because the-F parameter is used. But now, basically all Linux releases have built-in the-F parameter for LS. That is to say, we can see all kinds of resolution symbols without entering this parameter.

CD
This command is used to access the directory. It is used in the same way as in DOS, so I think there is nothing to say, but there are two points to add. First of all, unlike dos, Linux directories are case-sensitive. If case-insensitive, your CD operation will fail. Second, if you enter CD directly without adding anything to it, it will return to the user's home directory. If it is root, it is returned to/root. This function is the same as Cd ~ Is the same.

Mkdir, rmdir
The mkdir command is used to create a new directory. The rmdir command is used to delete the directory to be created. The functions of these two commands are no longer described. They are basically the same as those of the MD and RD commands in DOS.

CP
This command is equivalent to the Copy command below dos. The specific usage is: CP-r source file (source) target file (target)
The parameter R is used to copy data together with sub-directories in the Metafile. Readers familiar with DOS may find it easier to use this command. After all, they need to press the keyboard twice less than below dos.

Rm
This command is used to delete files. It is different from the RM (delete an empty directory) in DOS. Common Parameters of the RM command include-I,-R, and-f.
For example, I want to delete a text file Rm-I test.
The system will ask us: "RM: Remove 'test '? Y ". After you press enter, the file will be deleted. This is because Linux does not have undelete commands like DOS, or it can use tools such as pctool to save deleted files, files deleted in Linux cannot be recovered. Therefore, it is necessary to use this parameter before deletion.
Rm-r directory name: this operation can be deleted along with the subdirectories under this directory. The function is similar to rmdir.
Rm-F file name (directory name): this operation can be forcibly deleted.

MV
The function of this command is to move a directory or file. The extended function is to rename a directory or file. Its usage is basically the same as the move in DOS. When you use this command to move a directory, it will be removed along with the subdirectories under the directory. In addition, there is no RENAME Command in Linux, so if you want to rename a file or directory, you can use the following method: the original MV file (directory) Name new file (directory) Name.

Du, DF
The du command displays the disk space occupied by the current directory, and the DF command displays the remaining disk space of the current disk. If the du command does not add any parameters, the returned information is the usage of the entire disk. If a directory is added to it, this is the usage of the directory on the disk (this function is not available in DOS ). However, I generally do not like to use du because it provides too much information. I don't think so. I am the most commonly used DF command, because the amount of space left on the disk is very important to me.

Cat
This command is a very important command in Linux. Its function is to display or link common ASCII text files. Cat is short for concatenate, similar to the type command under DOS. Its usage is as follows:
Cat text displays the text file;
Cat file1 file2 displays file1 and file2 in sequence;
Cat file1 file2> file3 combines the content of file1 and file2, and then "Redirect (>)" to the file3 file.
">" Is a very interesting symbol. It means to redirect to the right, that is, to treat the result on the left as an input and then input it to the file file3. Note that file3 is a file that has not existed before redirection. If file3 is an existing file, its content is overwritten and changed to file1 + file2. If there is no file name on the left, and there is a file name on the right, for example:
Cat> file1: The result is a blank line. Wait for you to enter the text, and then press [CTRL] + [c] or [CTRL] + [D]. the editing is completed and the file file1 is generated. The content of file1 is the content you just entered. The result of this process is the same as that of copy con file1 in DOS.
In addition, if you use the following command:
Cat file1> file2: This will be used to "APPEND" the content of file1 to the end of file2, while the content of file2 still exists. This type of redirection character> is more common than>, it can be used more.

More, less
These are two commands for displaying common text files. If a text file is too long to display more than one screen, it is not ideal to use Cat, you can try the more and less commands. The more command can temporarily hold a file with more than one page on the screen. It will not be displayed until you press any key. In addition to more functions, less can also be used to scroll up or down the network by using the direction keys. Therefore, when you read articles, less is a good choice.

Clear
This command is used to clear the screen. It does not require any parameters. It has the same function as the CLR in DOS. If you think the screen is too messy, you can use it to clear information on the screen.

PWD
The purpose of this command is to display the current working path of the user. This command does not need to be said.

Ln
This is another very important command in Linux. Please be familiar with it. Its function is to create a non-same link for a file in another location. The most common parameter of this command is-S. The specific usage is the target file of the Ln-S source file.
When we need to use the same file in different directories, we do not need to put a file that must be the same under each required directory. We only need to put it in a fixed directory, put the file, and then use the ln command link in other directories to link it, without occupying disk space repeatedly. Example: ln-S/bin/less/usr/local/bin/less
-S indicates the symbol (symbolic.
There are two points to note: first, the ln command will keep the synchronization of each link file, that is, no matter which one you change, other files will change the same; second, there are two types of LN links: Soft link and hard link. The soft link is ln-s *****. It will only generate a file image at your selected location, it does not occupy disk space. The hard link ln *** has no parameter-S. It will generate a file of the same size as the source file at the selected position, both soft links and hard links are synchronized.
If you use ls to view a directory, you will find that some files are followed by a @ symbol, that is, a file generated using LN command, and you can use LS-l command to view it, the link path is displayed.

Man
If your English is good enough, you can be proficient in Linux without relying on anyone, as long as you use man. Man is actually the help of command usage. The most important thing to learn about any UNIX operating system is to learn to use man's Auxiliary Command. Man is the abbreviation of manual (manual). Its description is very detailed, but it seems a headache because it is both in English. It is recommended that you go to man again when you need it. Normally, remember some basic usage.

Logout
At first glance, we can see that this is the command to exit the system. I will not say much about it. It should be emphasized that Linux is a multi-user, multi-process operating system, so if you don't need it, you can quit the system. You don't have to worry about shutting down the system, that is the case for the system administrator. But remember that even if you use Linux on a single machine, logout will not

Related Article

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.