Linux - Comment extraire un fichier tar.gz
Dans ce tutoriel, nous allons vous montrer comment extraire un fichiertar.gz:
tar vxf filename.tar.gz
Exemple
Par exemple,apache-ant-1.9.4-bin.tar.gz dans votre dossier~/Download.
$ cd ~
$ pwd
/Users/example
# Optionally, create a new folder for the archived file.
$ mkdir tools
$ cd tools
$ pwd
/Users/example/tools
# Copy archived file to an above newly created folder.
$ cp ~/Downloads/apache-ant-1.9.4-bin.tar.gz ~/tools
# Extracts it
$ tar vxf apache-ant-1.9.4-bin.tar.gz
x apache-ant-1.9.4/bin/ant
x apache-ant-1.9.4/bin/antRun
x apache-ant-1.9.4/bin/antRun.pl
x apache-ant-1.9.4/bin/complete-ant-cmd.pl
x apache-ant-1.9.4/bin/runant.pl
x apache-ant-1.9.4/bin/runant.py
x apache-ant-1.9.4/
x apache-ant-1.9.4/bin/
......
$ pwd
/Users/example/tools
$ ls -lsah
0 drwxr-xr-x@ 15 example staff 510B Nov 22 11:24 apache-ant-1.9.4
10872 -rw-r-----@ 1 example staff 5.3M Oct 29 14:42 apache-ant-1.9.4-bin.tar.gz