How do I unzip a tar file?

How do I unzip a tar file?
Answer
How to open or Untar a “tar” file in Linux or Unix:
  1. From the terminal, change to the directory where yourfile.tar has been downloaded.
  2. Type tar -xvf yourfile.tar to extract the file to the current directory.
  3. Or tar -C /myfolder -xvf yourfile.tar to extract to another directory.
To extract .gz files we use gunzip command.
First use following command to create gzip (.gz) archive of access.log file.
Keep remember that below command will remove original file.
Above command will create a archive file named access.log.gz in current directory.
 

Tìm kiếm

Back
Top