加载评论时出现问题。

Compressed Files rar zip tar.gz

支持门户  »  Knowledgebase  »  查看文章

  打印
  • 13/01/2020 12:02 PM

To extract .zip files the command would be as follows:
user@server ~ $ unzip archive.zip
To compress:
user@server ~ $ zip -v zipfilename.zip file.ext
or
user@server ~ $ zip -v zipfilename.zip directory/*


To extract .bz2 files:
user@server ~ $ bunzip2 archive.bz2
To compress:
user@server ~ $ bzip2 file.ext

To extract .gz files:
user@server ~ $ gzip -d archive.gz
To compress:
user@server ~ $ gzip file.ext

To extract .tar files:
user@server ~ $ tar -xvf archive.tar
To compress:
user@server ~ $ tar -cvf archive.tar file1.ext file2.ext directory/

To extract .tar.bz2 files:
user@server ~ $ tar -xvjf archive.tar.bz2
To compress:
user@server ~ $ tar -cvjf file.tar.bz2 file1.ext file2.ext directory/

To extract .tar.gz files:
user@server ~ $ tar -xvzf archive.tar.gz
To compress:
user@server ~ $ tar -cvzf file.tar.gz file1.ext file2.ext directory/

Please note that these are the most basic forms of the commands, and have many options that are possible. HostGator does not provide support for using these commands, however to learn more about each command you can type user@server ~ $ man <command> Where <command> is the command you would like to learn more about, such as "tar" or "gzip."



通过分享

相关文章

Copyright © 2026 TheGigabit. All right reserved. Reg.No: 200701034297 (792326-P)