Set alias: Alias command or modify configuration file
Alias command format:
Alias new_command= ' command sequence '
When the alias command is set, the terminal is disabled, and the alias command can be written to the ~/.BASHRC file, and each new shell will read the contents of the ~/.BASHRC file when it is generated.
Usage such as: [[email protected] ~]# alias rm= ' CP [email protected] ~/backup;rm [email protected] ' Copy the file to the user's home directory in the backup directory before deleting it.
To delete an alias:
Unalias command format:
Unalias aliases
or delete the set alias directory directly into the configuration file
If you want to ignore aliases after setting an alias, you can use \ to escape aliases, such as \command, directly using the command itself.
Terminal Information Processing:
Get the number of terminal rows, columns
Tput cols
Tput lines
Get Terminal name
Tput longname
Move cursor to (50,50)
Tput Cup 50 50
Set the terminal background color
Tput setb num where num takes value between 0-7
Set text foreground color
Tput setf num where num takes value between 0-7
Reverse Display
Tput Rev
Set Text style to bold
Tput Bold
Set underline starting and ending
Tput Smul underline to the color is not white text at the automatic disappearance, this is a problem
Tput Rmul
Delete the cursor to the end of the line so the content
Tput Ed
Clear Screen
Tput Clear
Save Cursor position
Tput SC
Restore cursor Position
Tput RC
Cursor is not visible
Tput Civis
Cursor visible
Tput Cnorm
Restore default values
Tput sgr0
Use the following methods:
[[email protected] 123]# echo $ (tput SETAF 2; tput setab 0; tput bold) ' Background color show ' $ (tput sgr0)
Stty command:
Prohibit output capitalization
Stty IUCLC Open
STTY-IUCLC off
Prohibit output lowercase
Stty OLCUC Open
STTY-OLCUC off
Print terminal rows and columns
Stty size
Suppress display
Stty-echo Open Prohibit
Stty echo off disable
Ignore carriage return characters
STTY-IGNCR off Ignore
Stty IGNCR Open Ignore
[Email protected] 123]# stty IUCLC [[email protected] 123]# sldddssd^c [[email protected] 123]# STTY-IUCLC [Email protected] 123]# stty OLCUC [[email protected] 123]# fdlj^c [[email protected] 123]# STTY-OLCUC [[email] Protected] 123]# Dafd^c
This article is from the "Gan mu" blog, please be sure to keep this source http://ganmu.blog.51cto.com/9305511/1846638
1.7-8 aliases, Endpoints