Although a lot worse days, but it is the first one day ......
history
View order history records
! No. Check command and command execution
-c Clear
File on the command history
Variables on command history (environment variables)
Command Completion
tab: Tab \ t four spacesroles: prompt, auto-complete command
Directory completion
tabrole: prompt, auto-complete catalog
Aliases
alias command to set the alias command = 'command parameter'
alias cdnet="cd /etc/sysconfig/network-scripts/"
To permanently save the settings in .bashrc
Command execution status
In Linux, each execute a command, there will be two results ofthe command itself back into the contents of
the result of the state command of
$ variable, used to store variable command execution state;?
0 for success
1-255 represents a failure state
Read the special file system startup sequence
/etc/profile-->/etc/profile/*.sh-->/.bash_profile-->~/.bashrc-->/etc/bashrc
/ etc / profile: define environment variables (all users)
/ etc / bashrx: define local variables --alias (all users)
~ / .bash_profile: definition of environment variables (user specified)
~ / .bashrc: define local variables --alias (user specified)
Sources / etc / or Profile. / etc / profile
/ etc / bashrx: define local variables --alias (all users)
~ / .bash_profile: definition of environment variables (user specified)
~ / .bashrc: define local variables --alias (user specified)
Sources / etc / or Profile. / etc / profile
linux directory rules
FHS directory rules:
FHS specification defines two layers, a first layer, / each following directory file data should be what to put, for example, / etc should be placed document set, / bin and / sbin executable file should be placed and the like. Because Linux developers too much, if everyone uses their own directory configuration, it will probably bring a lot of management problems. Can you imagine, after you enter a business, the exposure to the Linux directory configuration method you used to actually learn it completely different? hard to imagine. So, then there is the introduction of so-called Filesystem Hierarchy Standard (Filesystem Hierarchy Standard, FHS).
The second layer is defined for the sub-directory / usr in / var two directories. For example, / var / log placement system log file, / usr / share the shared data and the like are placed.
The second layer is defined for the sub-directory / usr in / var two directories. For example, / var / log placement system log file, / usr / share the shared data and the like are placed.
takes
It is not in itself but an archiving tool compression tool
compression tools: gizp, bizp2 (bz2), xz
view compressed files without decompressing: zcat
parameters:
compression tools: gizp, bizp2 (bz2), xz
view compressed files without decompressing: zcat
parameters:
-j -> bizp2
-J-> the xz
-Z-> gizp
-C-> the Create
-x-// Extract can not specify an extraction tool
-f-> specify the file name
-v-> show details
-d-> Solutions compression
-t-> to view the contents without extracting
-J-> the xz
-Z-> gizp
-C-> the Create
-x-// Extract can not specify an extraction tool
-f-> specify the file name
-v-> show details
-d-> Solutions compression
-t-> to view the contents without extracting
cal
View current calendar
clock / hwclock
Check the hardware clock
Output System Time:
date +%F\ %H-%M-%S
date +%T
date +%T
File wildcard --globbing
Wildcard file is not a regular expression
? Any single character
* of any length of any characters
[] any character within the specified range
1, start with the specified character ^
2, any [^] outside a specified range of characters
specified character class:
? Any single character
* of any length of any characters
[] any character within the specified range
1, start with the specified character ^
2, any [^] outside a specified range of characters
specified character class:
[: Alnum:] letters + numbers
[: Alpha:] letter
[: Upper:] uppercase letters
[: Lower:] lowercase
[: Digit:] Digital
[: Space:] space
Redirect
Category: standard input, standard output and standard error
Input Data: Keyboard -> standard input, but not the only way to input
data Output: Display -> standard output, but not the only output
fd file identifier 0 - 9, is equivalent to document classification
0. 1 2
0: standard output
1: standard input
2: standard error
data Output: Display -> standard output, but not the only output
fd file identifier 0 - 9, is equivalent to document classification
0. 1 2
0: standard output
1: standard input
2: standard error
Common redirection symbols
1, the standard output> redirection cover (dangerous)
SET -C redirection cancel cover (first)
> | forced redirection cover (first)
>> append redirection (not covered)
2, standard input
<tr replacement file contents
tr ADC [the ABC] <file.txt
<< >> CAT a.txt the EOF <<
> 1
> 2
>. 3
the EOF
. 3, the error output
when the output needs to be added pipeline at
2> 2 >>
&> & 1 & 2 == >>
tee: input and output at the same time, if memory overwrites files in other content
hot key
ctrl + L clear screen (generally on this meaning)ctrl + C delete the entire line
ctrl + character before u cursor is deleted
ctrl + character after the k cursor is deleted
ctrl + A moves to the beginning of the current line
ctrl + E to move to the current row end of
ctrl + w a space as a separator, to delete a file
ctrl + r to enter an interactive interface, a recent search using the command