Home > Article > Operation and Maintenance > How to use linux tar command
How to use the linux tar command: First log in to the Linux server; then create a new txt file and package it using the tar command. The format is [tar -cvf packaged file name file to be packaged].
How to use the linux tar command:
1. First log in to a usable linux server:
2. In this location, I created a new a.txt file for demonstration:
3. Continue Let’s talk about tar. This command is used for packaging.
tar -cvf is the file name of the package and the file to be packaged (source file)
-c means packaging
-v means to display the packaging process
-f specifies the packaged file name
The following is a demonstration: tar -cvf newfile.tar a.txt
4. It can be seen that the packaging is successful. Then I downloaded it from the server and decompressed it:
#5. It proves that it can indeed be used. The above is about the tar packaging. Since there is packaging , then there are unpacking instructions:
Related learning recommendations: linux video tutorial
The above is the detailed content of How to use linux tar command. For more information, please follow other related articles on the PHP Chinese website!