There was a problem loading the comments.

Compressed Files rar zip tar.gz

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
  • 13/01/2020 12:02 PM

To extract .zip files the command would be as follows:
[email protected] ~ $ unzip archive.zip
To compress:
[email protected] ~ $ zip -v zipfilename.zip file.ext
or
[email protected] ~ $ zip -v zipfilename.zip directory/*


To extract .bz2 files:
[email protected] ~ $ bunzip2 archive.bz2
To compress:
[email protected] ~ $ bzip2 file.ext

To extract .gz files:
[email protected] ~ $ gzip -d archive.gz
To compress:
[email protected] ~ $ gzip file.ext

To extract .tar files:
[email protected] ~ $ tar -xvf archive.tar
To compress:
[email protected] ~ $ tar -cvf archive.tar file1.ext file2.ext directory/

To extract .tar.bz2 files:
[email protected] ~ $ tar -xvjf archive.tar.bz2
To compress:
[email protected] ~ $ tar -cvjf file.tar.bz2 file1.ext file2.ext directory/

To extract .tar.gz files:
[email protected] ~ $ tar -xvzf archive.tar.gz
To compress:
[email protected] ~ $ 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 [email protected] ~ $ man <command> Where <command> is the command you would like to learn more about, such as "tar" or "gzip."



Share via

Related Articles

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