In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to back up the environment variable files in Linux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Bzip2 command enter a command at the shell prompt:
Compress the file:
The bzip2 filename / / file is compressed and saved as filename.bz2
Extract the file:
Bunzip2 filename.bz2 / / filename.bz2 is deleted and filename is used instead of bzip2 filename.bz2 file1 file2 file3 / usr/work/school / / to compress the contents of the file1, file2, file3 and / usr/work/school directories into the filename.bz2gzip command
Command at the shell prompt:
Compress the file:
The gzip filename / / file is compressed and saved as filename.gz
Extract the file:
Gunzip filename.gz / / filename.gz is deleted, and filename is used instead of gzip-r filename.gz file1 file2 file3 / usr/work/school / / the above command compresses the contents of the file1, file2, file3, and / usr/work/school directories into the filename.gztar command tar, which packages a large number of files and directories into a file-c to create a new archive-f when used with the-c option The tar file created uses the file name specified by this option When used with the-x option, the archive specified by this option is released-t displays a list of files included in the tar file-v displays the archiving progress of the file-x extracts the file from the archive-z compresses the tar file using gzip-j compresses the tar file using bzip2
To create a tar file:
Tar-cvf filename.tar directory/file / home/mine / / the above command puts directory/file and / home/mine into the archive file
To list the contents of the tar file:
Tar-tvf filename.tar / / to extract the tar file, enter the command: tar-xvf filename.tar / / this command will not delete the tar file, but will copy the unarchived contents to the current directory and retain any directory structure used by the archived file.
Keep in mind that tar does not compress files by default.
To create a file that is archived and compressed using tar and bzip2, use the-j option: tar-cjvf filename.tbz file
If you use the bunzip2 command to extract the filename.tbz file, the filename.tbz is deleted and replaced by filename.tar.
To expand and unarchive the bzip.tar file, enter the command: tar-xjvf filename.tbz
To create a file archived and compressed with tar and gzip, use the-z option: tar-czvf filename.tgz file
If you use the gunzip command to extract the filename.tgz file, the filename.tgz will be deleted and replaced by filename.tar
This is the end of the article on "how to back up environmental variable files in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.