Self-study Linux instruction analysis-alias
1 · command format
Alias name= ' command line '
Alias name= ' command ' I am Free Mans. " ‘
2. Command function
Displays and modifies aliases.
1) to prevent human error by adding some protection parameters to the dangerous command,
2) Turn many complex string commands into a simple string or command
3. Command Labels
[email protected] tmp]# cat ~/.BASHRC
#. BASHRC
# User specific aliases and functions
Alias rm= ' Rm-i '
Alias cp= ' Cp-i '
Alias mv= ' Mv-i '
# Source Global Definitions
if [-F/ETC/BASHRC]; Then
. /etc/bashrc
Fi
[email protected] ~]# cat ~/.BASHRC ~ represents home directory, is currently Root is to represent Root , if other users are representing other directories
Define a permanent Alias
[Email protected] tmp]# VI ~/.BASHRC
#. BASHRC
# User specific aliases and functions
Alias rm= ' Rm-i '
Alias cp= ' Cp-i '
Alias mv= ' Mv-i '
(Type the alias at the time of the related alias definition)
# Source Global Definitions
if [-F/ETC/BASHRC]; Then
. /etc/bashrc
Fi
Self-study Linux instruction analysis-alias