Alias
With a simple name instead of a complex command (a single name), if you ignore the command name, print the alias of all defined commands.
grammar:
Alias [parameter] aliasname = 'command'
-t creates a trackable alias for the Linux command.
-x output alias to use it in the shell script.
ASH
Written by Kenneth Almquist in 1989, a lot of characteristics close to the shell of System V.
grammar:
ASH [-EFLIJNSXZ] [ EFLIJNSXZ] [-c command] [parameter]
-c If the -c parameter is used, ASH exits after executing this command.
-s If the -s parameter is used, the ASH reads the command from the standard output. If the ASH does not follow the -c -s parameter, the command is read in the file from this file, and output it directly to the file. EXIT. If the first character of the parameter 0 is "-", ASH is determined to login shell, ASH will read the corresponding settings and environment variables from the / etc / profile or user directory.
-e Exit ASH when the return value is not a non-zero value.
-f Off ASH automatically generates the file name.
-j opens the work control of Berkeley UNIX style.
-n reads the command but does not execute.
Banner
Print high quality titles in the output row, if you output text to be printed, wait for you to enter a line from the standard input.
grammar:
/ usr / games / banner [-wn] msg
-w width. The output width is from 132 to n, and the N default is 80 columns.
Bash
It is currently widely used, with SH compatibility, and contains some useful features in KSH and CSH.
grammar:
Bash [parameter] [file name]
-c string reads the command from the string, if there is a variable after the string is set to the location parameters starting with $ 0.
-i interactive execution command. For example: RM -I.
-s read command from the standard input until you enter the exit.
- indicates that the parameters are executed, and the parameters followed later, all variables behind are considered to be the file name.
-norc If Bash is interactive, no personal initialization file ~ / .bashrc, if BASH is run as a shell, this parameter is default is off.
-noprofile does not perform a startup file within the system, nor does the personal launch file ~ / .bash_profile, ~ / bash_login or ~ / .profile, BASH as the startup file as the SILL as the login shell.
-rcfile file name If BASH is interactive, the file is used as a Bash startup file.
-Version Displays the version number of this BASH at the beginning of Bash.
-quiet does not display version number or other information, this is the default value.
-login activates Bash disguise to log in to the shell.
-posix changes the behavior of Bash to make it compliant with the standards specified in POSIX1003.2.
Cal
Show a calendar. It is very useful for users who queries a certain day in a certain year.
grammar:
Cal [-jy] [month]
-J x Shows Julian Date (the days are accumulated from January 1)
-y shows this year's calendar.
The year must write all, "Cal 99" is incorrect and should be written as "CAL 1999". Month must be a number or English full name of 1-12. This month's calendar is output without any parameters.
Cat
Connect the file together, use the ">" to combine several files into a new file, or use ">>" to append the file back to the stored file.
grammar:
Cat [parameter] filelist
-e Prints a $ to represent the end of each row, this option is only valid for use with the -v option. -v Displays control characters or other non-printable characters.
-s hidden information that is unreadable.
-t prints each Tab as ^ L, and fills FORM feed with ^ L
-u unbuffed printout.
FILELIST is used to combine the optional list of files.
CD
Change the current working directory.
grammar:
CD directory name
If there is no directory name, return the user's root directory, and the user must have permission to enter the directory.
chgrp
Group ownership of the file. Some of the options for chGRP commands have two options format. We only list short means of these options here. For details, please see MAN PAGES.
grammar:
Chgrp [parameter] group file
-c is only described in detail only if the ownership of the file does change.
-f does not print an error message for files that cannot be changed.
-v details the change in ownership.
-R recursive changes to the directory and its contents
--Help prints usage information on standard output and exits.
--Version prints version information on the standard output line and exits.
Groups to change. Can be GID or a valid group name.
Files To change the list of files of the group ownership, separated by space.
If it is not owner or root, you cannot modify the group ownership of the file.
chmod
Change the mode of the file. File mode controls access to this file, Linux has three security levels: owner level, group access level, and other user-level. In these three levels, there are three privileges: read, write and execute. For standard files, read rights means that you can browse the contents of the file, write permissions can modify the file, and execute permissions can run the file. The directory form is different. Reading rights can browse content in this directory, write permissions can create files or delete files in the directory. Execution permissions mean that can be converted from a directory to another directory.
grammar:
CHMOD [parameter] protection mode file or directory
-c Only in detail only when the authority of the file does change.
-f does not output an error message that the permissions cannot be changed.
-V Detailed explanation of permissions.
-R changes the permissions of this directory and its subdirectory files.
--Help outputs help information on standard output and exits.
--Version outputs version information on standard output and exits.
Protection mode format is [UGOA ...] [[ - =] [rwxxstugo ...] ...] [, ...]
CP
Copy file.
grammar:
CP [parameter] source file target file or directory
-A The structure and properties of the source file are kept as much as possible in the backup.
-b makes backups to overwrite or delete files.
-d The symbolic link is copied as a symbolic link without copying the files they link. And reserve the inherent link relationship between the source files in the backup.
-f deletes the existing target file.
-i prompts whether to override the existing target file.
-l forms an inherent link to replace a copy of the non-directory.
-P forms each target file name by adding a target directory branch and the specified source file name. The last variable to the CP must be the existing directory name.
-P keeps the owner, group, permissions, and time flag of the original file.
-r recursive copy catalog.
-s establishes a symbolic connection, replacing the non-directory file copy.
-v prints each file name before copying.
-Ri-r
--Help prints help information on standard output and exits.
--Version prints version information on standard output and exits.
crontab
Operate the daemon of each user and the schedule of the execution.
grammar:
Crontab file [-u user] replaces the current crontab with the specified file.
Crontab - [-U user] replaces the current crontab with standard input
crontab -l [user] lists the current crontab
Crontab -e [user] edit the user's current crontab
CRONTAB -D [User] Delete the current crontab
crontab -c Dir specifies crontab's directory
The format of the crontab file is: M h D m D CMDM Minute (0-59).
H hours (0-23).
D days (1-31).
M month (1-12).
D One day in the week (0-6, 0 is Sunday).
CMD wants to run.
date
Display the time and date of the system, root can use this command to set the date and time. The user can control how the date is displayed.
grammar:
Date MMDDHMMYY or DATE FORMATE
MM Month (0-12).
DD date (1-31).
HH hours (00-23).
MM Minute (00-59).
YY year (00-99).
Format consists of% and tightly followed the following characters:
n inserted into a line.
T is inserted into the TAB.
M month (number).
D date (number).
The last two of Y years.
D Nn / DD / YY format date.
I hour.
M minutes.
s second.
W Week (0-6, 0 is Sunday)
DD
Copy a file
grammar:
DD [-help] [-version] [i = file] [ibs = bytes] [obs = bytes] [BS = BYTES] [CBS = bytes]
[SKIP = Blocks] [seek = blicks] [conv = {ASCII, EBCDIC, IBM, Block, UNBLOCK, LCASE, UCASE,
Swab, noerror, notrunc, sync}]
If = file is used as a source file instead of standard input.
Of = file instead of the standard output as a target file in File.
Ibs = bytes read bytes bytes bytes.
Obs = bytes write bytes bytes bytes.
CBS = bytes reads and writes BYTES, this parameter will override the value of IBS and OBS.
Skip = Blocks ignores blocks of blocks in the beginning of the Blocks IBS size.
Seek = Blocks ignores blocks of blocks in the blocks OBS size.
Count = Blocks only copy blocks of blocks IBS size.
Conve = converness [, conversion...] Convert file, convertible file format with ASCII, EBCDIC, IBM, Block, UNBLOCK, LCASE, UCASE, SWAB, NOERROR, NOTRUNC, SYNC.
--Help outputs help information on standard output and exits.
--Version outputs version information on standard output and exits.
DF
Check the remaining space of disk
grammar:
DF [parameter]
-A Lists Block for zero file system default is not listed.
-i uses inode usage instead of the use of Block.
-k Output Block in K as K (default 512bytes).
-P Use POSIX format output.
-T outputs the type of each file system.
-t only outputs a file system listing the types in fSTYPE.
-X only outputs file systems that are not in fSTYPE.
-v is useless, just to compatibility with the SYSTEM V version of DF.
--Help outputs help information on standard output and exits.
--Version outputs version information on standard output and exits.
DIFF
Compare the difference between two text files
grammar:
DIFF [Parameters] Source File Target Files - A handle all files as text files.
-b ignores the difference between spaces.
-B ignores the difference between airline.
-Q is only different, and the specific information is not reported.
-c Use the outline output format.
-e Output ED can be edited format.
-f outputs similar to-E-resection.
-H utilizes the test method to accelerate the search for large files.
-i ignores changes in cases.
-l The output pagination with the PR.
-N output RCS format.
-r Compares all subdirectories when the directory is compared.
-v outputs version information on standard output and exits.
DU
Report disk space usage
grammar:
DU [parameter]
-a Displays the sum of the files.
-b outputs the size of the space in units of BYTE.
-c After processing all parameters, all of these parameters are given.
-k The size of the space occupied by kilobytes is output.
-l Statistical All files The size of all files is statistically affected in another connection.
-s Only the contract is displayed for each parameter.
-x -one file system ignores the directory that is not on this system.
-D no statistical command line parameter symbolic link file.
-L No statistic of the file.
-S Separate statistics size of each directory, does not include the size of the subdirectories.
--Help outputs help information on standard output and exits.
--Version outputs version information on standard output and exits.
echo
The parameters transmitted to this command are displayed on the standard output.
grammar:
Echo [parameter] string
-a does not output a new row.
-e Use Echo to display the following ESC characters.
/ a warning (bell).
/ B back.
/ c does not work in the end.
/ f change the page.
/ N wrap.
/ r Enter.
/ T tester.
/ V Vertical tab.
/ / Backslash.
The octave code of the / nnn character is NNN.
--Help outputs help information on standard output and exits.
--Version outputs version information on standard output and exits.
ENV
Modify the command execution environment without affecting the current environment. You can also display the current environment.
grammar:
ENV [parameter] variable command
-u Remove variables from the original environment
-i starts an empty environment to ignore all settings of the original environment.
--Help outputs help information on standard output and exits.
--Version outputs version information on standard output and exits.
File
Check file type
grammar:
FILE [parameter] [-f namefile] [-m Magicfile] file name
-v outputs version information on standard output and exits.
-m MagicFile Specifies new files used instead of / etc / magic.
-z Check the compressed file.
-c Outputs the analytical form that is being processed, and often uses the -m parameter to use the test new MAGICFILE file.
-f namefile reads the list of file names to be analyzed from the file Namefile.
-L allows symbolic links.
File name to be analyzed.
Find
Search specific files
grammar:
Find [path ..] [Matching Expression]
The directory to search for the path.
Match the file matching standard or description of the expression to search.
-name file name tells find to find the file.
-Perm mode matches all files that meet the specified numeric mode value, if the pattern is "-", search all modes except this mode.
-Size n matching size is the file name of N Block.
-user username Search all owner's files for your username.
-group group name searches all files for the group name.
-time n Search for files accessed in N days.
-mtime n Search for files modified in N days ago.
The -exec command executes commands to each match, and the flag {} is used to specify where the command execution file name appears, and the command must terminate in the symbol "/;".
-print outputs the search result to the standard output.
finger
Display information in the system.
grammar:
Funger [parameter] user name
-b is slightly going to the user's Home and Shell in the output. -f hidden heads in the head.
-l Forced long output.
-p does not print .plan file.
-q Displays a user's quick list.
-s Displays a short format.
User specifies the login name, actual name and last name.
Fortune
Output a fable or proverb
grammar:
Fortune
GREP
Search the matching row and output it in the file.
GREP
Search the matching row and output it in the file.
grammar:
GREP [- [AB]] NUM] [- [CEFGVBCHILNSVWX]] [-e] correct expression | -f file] [file name]
-A NUM outputs NUM line after matching line.
-B NUM outputs NUM line before the match line.
-V outputs copyright information.
-f file reads the expression from the file.
-q does not output.
-s does not output an error message.
gzexe
Complicates the executable to a smaller executable.
grammar:
Gzexe [file name.]
-d decompression
gzip
Compressed or decompressed file
grammar:
Gzip [parameter] file name.
-d decompression.
-h Displays the help information and exits.
-t check the compressed file.
-V Displays copyright information and exits.
-v output compressed information.
- # # is 0-9, the smaller the number, the sooner, but the smaller the compression ratio.
-c compression results are output to standard output, if the -c parameter is not added, Gzip will compress into .gz files and delete the source file.
HEAD
A few lines of displaying files.
grammar:
HEAD [parameter] file
-c n The front n byte of the output file.
-N N-output N row of output files.
-Q does not output information about the file name.
-V output file name information.
--Help outputs help information on standard output and exits.
--Version outputs version information on standard output and exits.
id
Display the user's system flag, report username, user number (ID), group name, and group number (GID).
grammar:
ID [parameter]
-g only displays the group number.
-G only shows the secondary group.
-u only displays the user number.
--Help outputs help information on standard output and exits.
--Version outputs version information on standard output and exits.
Kill
Terminate the current process.
grammar:
Kill [Signal] process number
The signal is sent to an optional signal, the default value is Sigterm. Other two common values, one is Sighup, which is a device hangs through the phone; the other is Sigkill, and cannot be ignored by the process.
-l Displays a signal name table that can be transmitted with KILL.
Less
Display files by page. Similar to more, but allows you to move before and after the file.
grammar:
Less [parameter] file name
-? Outputs the command option acceptable to the LESS.
-a starts the query after outputting the last line on the screen.
-c is overridden from the top row down.
-C with -c, but written before writing.
-e The second time to exit the LESS. The default exit method is to press the "Q" button.
-E Automatically exits the LESS after the end of the file.
-i queries ignore the case.
-n removes the line number.
-o file will output to the file.
-Q does not output a ring.
-Q is -q.
-s Complicates multiple spaces into an empty line.
-x n Each time the table is taken, the default value is 8.
ln
Establish a link between files.
grammar:
LN [parameter] source file target file
-b establishes a backup for the deleted file.
-d, -f allows root to build hard connections.
-f deletes the target file.
-i gives a prompt when deleting a file.
-n If the target file is a symbolic link of a directory, replace this symbolic link instead of linking in this directory.
The -s uses a symbolic link instead of hard connection.
-v outputs the file name of each file to be connected.
--Help Outputs Help Information on Standard Output and exits.
--Version outputs the version information on the standard output and then exits. LS
List the contents in the directory.
grammar:
LS [parameter] [directory]
-A Displays all files, including the hidden file (".", But does not list the current directory "." And superior directory "..".
-a Displays all files, including "." and ".." directory.
-c lists files according to the list.
-X Press the file.
-d only lists the directory name; does not list it.
-L gives a long list of files. Including permissions, ownership, size, file name, last modification time, etc.
Read and send an email to other users
grammar:
Mail [parameter] [user name]
-? Output a summary of this command.
-E Check the message in the inbox.
-f file opens a file to read the message. If you do not specify a file, use the MBOX file.
-F puts the send message to the first file that receives the same name as the same name.
-H Displays the header information of the content in the mailbox.
-s Subject Sets the subjectbar in the message head to Subject.
-u Read the user's inbox.
MAN
The online manual with a certain format is displayed.
grammar:
Man [parameter] [section] query name
-a Displays all information on the matching query name.
-b leaves a blank line in the output.
-d DIR adds the specified directory DIR to the search path.
McOPY
Copy file from the DOS file system or copy the file to the DOS file system.
grammar:
Mcopy [Parameter] Source File Target File
-T text file transfer. McOPY translate the carriage return / wrap into a wrap.
-n does not warn the user when overriding an existing file.
-m save file modification time.
MDIR
Displays the contents of the MS-DOS directory.
grammar:
MDIR [-w] directory name
-w Display directory with a wide format without file size and creation date.
Mesg
Select the information that receives or does not receive other users.
grammar:
MESG [Y] [N]
This command is used to control information that receives other users from using Talk or Write to the user. If you do not want to receive, use MESG N to send information to the user's terminal to send it.
Mkdir
Establish a new directory
grammar:
MKDIR [parameter] directory name
-m Mode Sets the mode of access to the new directory.
-p If the parent directory does not exist, create all parent directories.
More
Split screen display file. Press the ENTER key to display the next line, press the space bar to display the next screen.
grammar:
More [parameter] [file name]
-c When the file is displayed, it clears each window instead of rollout because it is quick.
-f statistical logic number rather than screen lines.
-l slightly from the from-feed character.
-r Force to display the control character in "^ X".
-s Display Multi-Bank Blank.
MV
Move or change name files and directories
grammar:
NV [parameter] source file target file
-b Make backups for mobile files.
-f mandatory coverage has files.
-i prompts the user before covering the file.
-u The time of the target file does not overwrite the target file than the original file.
-v Output information when moving files.
Passwd
Set the user password.
grammar:
Passwd [parameter] user name
-L shields a user's account
-n Set the user only if the password can be changed after the MIN.
-s display password information, such as user name, password status, and final change time.
-w After the Max day, the user needs to modify the password.
-x Sets the maximum time for user passwords.
PS
Reporting the process status. Since the process runs soon in execution, this report can only reflect the status of the query instant.
grammar:
PS [parameter]
-L gives a long list.
-u Displays username and start time.
-j is output according to the work format.
-s output in signal format.
-v Displays in virtual memory format.
-m displays memory information.
-a Displays the process of other users.
-x Displays a process without a control terminal.
-S increase the child CPU time and page error. -c lists the command line from the core Task_Structune.
-e display environment.
-w Use wide format.
-h does not display the head.
-r shows only a running process.
- N provides digital output for USER and WCHAN.
-txx only shows a process that is controlled by TTY.xx.
Below is the columns and descriptions of the reported reports:
PID process number.
PRI process priority.
Ni Linux process NICE value. Negative values means occupying smaller CPU times.
The size of the size virtual image is calculated as the text data stack.
The size of the RSS resides in space. Shows the number of K bytes of the program currently in memory.
The name of the kernel time waiting for the WCHAN process.
The status of the STAT process is given in one of the following code.
R is executable.
S sleep state.
D does not intermittently sleep.
T stop or track.
Z stalemate.
The W process has no resident page.
TT control process TTY name.
Pagein causes page error page numbers from disk.
TRS text resides in size.
The number of K bytes on the SWAP swap device.
PWD
Displays a working or current directory name.
PWD [parameter]
--Help Outputs Help Information on Standard Output and exits.
--Version outputs the version information on the standard output and then exits.
RCP
Remote copy command.
grammar:
RCP [parameter] host name: file 1 hostname file 2
-r If the source file is a directory, copy all subdirectories, and the target file must also be a directory.
-p Try to keep the file modification time and access.
-k requires RCP to obtain external license.
-X gives the copy of the data stream DES method encrypts.
RESET
Reset the terminal.
If the terminal is flown during the use of a reason terminal, you can recover if you use the RESET. The RESET calls the TPUT function to issue a reset signal to the terminal. If the screen is locked by Ctrl S, you can use CTRL Q to unlock the lock.
RM
Delete one or more files.
grammar:
RM [parameter] file or directory
-f ignores the files that do not exist and does not give users any prompts.
-i prompts the user when deleting each file.
-r Delete directory.
-v Deletes the output file information when each file is removed.
--Help Outputs Help Information on Standard Output and exits.
--Version outputs the version information on the standard output and then exits.
RMDir
Delete the empty directory.
grammar:
RMDIR [parameter] directory list
SDIFF
Generate a parallel comparison of files 1 and file 2, the output is:
TEXT TEXT is the same.
The TextText line exists only in the file 2.
Text | Text line is different.
grammar:
SDIFF [parameter] file 1 file 2
-w Width Specifies the output line width to width characters.
-l The same row only outputs the left side of the output.
-s does not display the same line.
Document 1 The file is in the left.
Document 2 The file is in the right side.
set
Display the value of the shell variable
SetColor
Set the color of the screen and other properties.
grammar:
-b Color Sets the background color to Color.
-g Color1 Color2 Sets the foreground color to Color1, the background color is set to Color2.
-n resets the screen to the default white foreground. Black background.
-r Color1 Color2 Sets the reverse rotation of the screen to display the foreground as Color1, reverse display background is Color2.
-o Color Set Border for Color.
Sync
Empty the buffer of the Linux file system.
This command must be called before the system's CPU stop operation. Both the reboot and halt commands call this command to empty the buffer. One of Linux's advantages is that the disk access speed is very fast, because it will not be used as a buffer, so that the system must be cleaned before shutting down, otherwise it will lose data.
SU
Change the user's ID or become ROOT
grammar:
SU username
TAIL
The last part of the file is displayed.
grammar:
Tail [parameter] file name
TAIL defaults to display the last 10 lines of each file in the file list, if there is no file name or file name "-", it reads the file from the standard input, if there are multiple files, it will be added in front of the file "= => File name file name