Lets say that the name of file is - test.tar.gz
Tar Usage and Options
- From the terminal, change to the directory where tar file is located.
- Now to extract the file to the current directory , run the command tar -zxvf test.tar.gz
To extract the file to a specific directory , run
tar -C /directory_name -zxvf test.tar.gz
NOTE : The extensions
.tgz
and .tar.gz
are equivalent and both signify that a tar file zipped with
gzip
. - From the terminal, change to the directory where tar file is located.
- Now to extract the file to the current directory , run the command tar -xvf test.tar
To extract the file to a specific directory , run
tar -C /directory_name -xvf test.tar
Tar Usage and Options
- c – create a archive file.
- x – extract a archive file.
- v – show the progress of archive file.
- f – filename of archive file.
- t – viewing content of archive file.
- j – filter archive through bzip2.
- z – filter archive through gzip.
- r – append or update files or directories to existing archive file.
- W – Verify a archive file.
- wildcards – Specify patters in unix tar command.
No comments :
Post a Comment