β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦1) DESCRIPTION :
1) Engineers working in the Linux environment will surely be impressed by the cumbersome commands and parameter command lines. Moreover, the terrible thing is not cumbersome, but a lot of repeated input of these cumbersome commands.
2) Under Linux, we have the alias command alias, which can customize those cumbersome commands as aliases that we can easily remember, which can greatly improve our efficiency.
3) However, the alias command is only valid for the current terminal. When the terminal is closed, all the aliases we set are invalid. So if we want to make these aliases permanent, we need to add them to the .bash_profile file
π¦1) DESCRIPTION :
1) Engineers working in the Linux environment will surely be impressed by the cumbersome commands and parameter command lines. Moreover, the terrible thing is not cumbersome, but a lot of repeated input of these cumbersome commands.
2) Under Linux, we have the alias command alias, which can customize those cumbersome commands as aliases that we can easily remember, which can greatly improve our efficiency.
3) However, the alias command is only valid for the current terminal. When the terminal is closed, all the aliases we set are invalid. So if we want to make these aliases permanent, we need to add them to the .bash_profile file
1. Compressed package files, especially tar files are widely used under Linux, but there are many options of tar command, which is not easy to remember. So we can define several commonly used options as an alias untar, so that when we need to decompress the tar file, just untar filename.
alias untar = 'tar -zxvf'
alias untar = 'tar -zxvf'
2. When we download a large file, the network is suddenly interrupted abnormally. Are we crazy about downloading again? Don't worry, our wget command has a -c option that supports breakpoint download, we can also set it as an alias:
alias wget='wget -c '
alias wget='wget -c '
3. Sometimes we need to generate a 20-character random number password. We can use the openssl command, but the complete command is very long and inconvenient. We can set an alias:
alias getpass="openssl rand -base64 20"
alias getpass="openssl rand -base64 20"
4. After downloading a file, we want to check its checksum value. We can encapsulate this command as an alias sha, and then we can check the checksum value of the file with sha filename.
alias sha='shasum -a 256 '
alias sha='shasum -a 256 '
5. Under normal circumstances, the ping command will output an unlimited number of times, but it doesn't really make much sense. We can use the -c command to limit it to 5 outputs, and then set it to alias ping. When using it, just ping url.
alias ping='ping -c 5'
alias ping='ping -c 5'