Alias creating aliases
Unalias Deleting aliases
type [name] to see if it is an internal or external command
env lists all environment variables and their contents in the current shell environment
set to observe all variables in the current shell environment
PS1 (prompt character setting)
\d: representative Date
\h: Full host name
\w: Full working directory
\u: User's account name
export custom variable into environment variable
read [-pt] reads a variable from the keyboard input
- P: Follow-up prompt
-T: Length of time after which the wait can be received
declare declaring variable properties
-A : Define an array
-I : defined as an integer number
- x: defined as environment variable
- R: The variable cannot be changed
Ulimit Restricting the relationship between the file system and the program
-A: List all restricted data
-r: Maximum file size This shell can build
stty-a List all keystrokes and key contents
cut-d followed by delimiters
-F Take out the first paragraph of the
Grep-c Calculate the number of ' search string ' found
-I ignores case differences
- N Output line number
- v Reverse selection
Sort Sorts
- F ignores case differences
- T delimiter
- R Reverse Sort
-B ignores the front-most whitespace part
-U The same part is only taken once
Unip to repeat
-I ignores case differences
wc-l only Travel
-W lists only how many words (English word)
- m number of characters
Tee Dual Guide
-A adds data to the file in a cumulative way
TR to delete text or replace text
-D Delete the SET1 string in the message
-S replaces duplicate characters
col-x to convert the TAB key to the equivalent space bar
joins have the same data part added together
- t join preset separates data with whitespace
-I ignores case differences
paste the two lines together, and the middle is separated by the [tab] key
- D can be followed by delimited characters
Expand the [tab] key into the space bar
Split Split
-B file size after which you want to split
- L split by number of rows
Shell Knowledge points