Press BREAK Key to adjust the terminal connection speed, eliminate terminal garbled
When you log in to login name and password
# Delete a character
@ 除 行
About system prompts
$ B shell / usr / old / bin / sh
K shell /usr/bin/ksh/--.profile
P shell / usr / bin / sh / - / kshrc
% C shell / usr / bin / csh /.login
/.cshrc
# Root
CDE.ttprofile
Script running when you exit the system:
.logout
Handmade .profile script:
..profile
You can enter multiple command lines in a command line, intermediate; separated.
Stty -a View the definition of a combination key
WHEREIS
-m finds an entry in the manual,
-b look up binary file location
-S check source code
Echo How Are you> / dev / pts / t0
The How are you will see on the PST / T0 terminal.
password:
At least 6 characters
At least 2 letters in the top 6
At least one of the top 6 is not a letter
News Show new news
News -a Show all news
News -n Displays the news title
Write talks with other users
Ctrl D end
MESG prohibits / allows others to send information to their own terminal
Ls -a lists hidden files (point files)
-i display i node information
CD - Back to the previous visited directory
Delete files that have not visited in a week have been named A.out and * .o
Find / / (- name a.out -a name '* .o' /) -atime 7 -exec rm {} /;
Mkdir
-P intermediate directory does not exist, create an intermediate directory
-M Specified permissions
Whoami only shows your own username
WHO AM I your own login terminal and username
WHO Shows all user login terminals and username
Delete a directory and its subdirectory
CHMOD -R 777 TEST
Rm -r test
Show the last 20 lines of WANGX
TAIL-N 20 TEST
Show TEST 20 to 30 lines
HEAD-N 30 Test | TAIL-N 10
CP -R with a copy of the catalog
Tset Sets Terminal Types
ENV displays environment variables
In order to use the configuration file, define in .profile:
ENV = ~ / .kshrc
Export env
Alias displays the present alias
UNALIAS Close alias
Variable replacement
$ VarName or $ (VarName}
Prazing is used to define changes to the text around them.
Exmp:
> my_ls = "ls -afc"
> $ my_ls lists the directory structure
> echo my_ls display
"ls -afc"
Command replacement
$ (Command) OR
'Command' (In b shell)
EXAMPLE:
> MY_LS = $ (LS -AFC)
> Echo $ my_ls lists the directory structure
Waveness replacement
a. Separate ~ or / before ~, equal to Home environment variables
b. ~ equal to PWD variables
c. ~ - equal to LDPWD
d. If you take a few characters, follow /, if these characters match a system username, the username owner directory
Several characters that will be replaced ~ and followed by.
EXAMPLE:
Echo ~ test / aaa
Output: / home / test / aaa
Use the export command to transfer the variable to the environment, make the child process accessed:
Export Color
The sub-process does not affect the environment variable of the parent process, even if the export command exec command overrides the original shell code area
EXEC PS-EF
The code of the PS command will overwrite the original shell code, will not return to the shell environment after execution
/ Mask the following characters, (no matter what character)
'Shield all characters contained therefrom
"Most of which contains characters, except for $ and /
> Output Redirection
>> Output Redirection (APPEND)
2> Error redirection
2 >> Error Redirection (APPEND)
2> & 1 error and output direct output
Merge two files to F3
Cat F1 F2 >> F3
WANGX
$> wangx
The input and output redirection is used in one process and the files.
And the pipelines are directly forwarded between the two processes
Date | TR "[: Lower:]" "[: Upper:]" Write lowercase to uppercase
Tr -s '[: space:]' converts all consecutive spaces into a space
WHO | Tee Whoson | WC -L
Use the result of who from both the file whos, and transport the command WC