1. Command aliases that are permanently effective for the current user
1. Write a command named hello. The function implemented is that every time the hello command is entered, hello will be written to the file /file.txt for everyone.
"alias" command, append "hello, everyone" to "file.txt"
2. Write a command aliased as shuaxin. The function achieved is that every time the command is entered, all times in the file.txt file are updated to the current time.
"touch" updates file time
2. Command aliases that are valid for all users
In the third-level title, write a command alias hh that is valid for all users. After each user enters this command, a file1 file can be created in the user's home directory.
Enter "vim /etc/bashrc"
and write the code "alias hh='touch ~/file1'" at the end of bashrc
to call the view. After entering the code, enter "source /etc/bashrc" to re-execute the newly modified command and enter " hh", and then check the creation time of "file1".
3. Command history: View the command history and call the tenth line of commands