In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Centos in the file compression and decompression frequency is still larger, a lot of compression software are downloaded to the linux system, and then decompression installation, using the tar command, this command has the main options and auxiliary options, here to summarize it, to facilitate their own use.
Tar
Syntax: tar [primary option + secondary option] file or directory
Main options:
C create a new archive file. Select this option if the user wants to back up a directory or some files. It's the equivalent of packing.
X release the file from the archive file. It's the equivalent of unpacking.
T list the contents of the archive file to see which files have been backed up.
Pay special attention to that only one c/x/t can exist in the issue of parameters! Cannot exist at the same time! Because it is impossible to compress and decompress at the same time.
Secondary options:
-z: does it also have the properties of gzip? That is, does it need to be compressed or decompressed with gzip? The general format is xx.tar.gz or xx. Tgz
-j: does it also have the properties of bzip2? That is, does it need to be compressed or decompressed with bzip2? The general format is xx.tar.bz2
-v: display files in the process of compression! This is commonly used.
-f: use the file name, please note that you should receive the file name immediately after f! Don't add any other parameters!
-p: use the original properties of the original file (the attributes will not change based on the user)
(1), compressed file
Tar-cvf 123.tar 123.txt
Tar-czvf 123.tar.gz 123.txt
Tar-cjvf 123.tar.bz 123.txt # # compress 123.txt into various formats #
(2) View the decompressed file
Tar tf 123.tar.gz
(3) decompress the file
Tar-xzvf 123.tar.gz-C / opt/
If you do not add-C / opt/, you will extract it to the current directory.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.