Linux – Descompactar arquivos

Normalmente quando baixamos algum programa para o Linux o mesmo vem compactado, nesta dica vamos ver como descompactar aquivos no Linux de acordo com a extensão do mesmo.

Descompactar arquivo “.zip”:

[root@srv-centos ~]# unzip wordpress-4.9.5-pt_BR.zip 
Archive:  wordpress-4.9.5-pt_BR.zip
   creating: wordpress/
  inflating: wordpress/wp-login.php  
  inflating: wordpress/wp-cron.php   
  inflating: wordpress/xmlrpc.php    
  inflating: wordpress/wp-load.php   
   creating: wordpress/wp-admin/
  inflating: wordpress/wp-admin/credits.php  
  inflating: wordpress/wp-admin/admin-functions.php  
  inflating: wordpress/wp-admin/options-reading.php  
  inflating: wordpress/wp-admin/edit-tags.php  
  inflating: wordpress/wp-admin/link-manager.php  
  inflating: wordpress/wp-admin/options-writing.php  
  inflating: wordpress/wp-admin/network.php  
   creating: wordpress/wp-admin/includes/
...

Descompactar aquivo “.tar.xz”:

[root@srv-centos ~]# tar -xvf linux-4.16.3.tar.xz 
linux-4.16.3/
linux-4.16.3/.cocciconfig
linux-4.16.3/.get_maintainer.ignore
linux-4.16.3/.gitattributes
linux-4.16.3/.gitignore
linux-4.16.3/.mailmap
linux-4.16.3/COPYING
linux-4.16.3/CREDITS
linux-4.16.3/Documentation/
linux-4.16.3/Documentation/.gitignore
linux-4.16.3/Documentation/00-INDEX
linux-4.16.3/Documentation/ABI/
...

Descompactar arquivo “*.tar.gz”:

[root@srv-centos ~]# tar -xzvf wordpress-4.9.5-pt_BR.tar.gz 
wordpress/
wordpress/wp-login.php
wordpress/wp-cron.php
wordpress/xmlrpc.php
wordpress/wp-load.php
wordpress/wp-admin/
wordpress/wp-admin/credits.php
wordpress/wp-admin/admin-functions.php
wordpress/wp-admin/options-reading.php
wordpress/wp-admin/edit-tags.php
...

Descompactar aquivo “*.tar.bz2”:

[root@srv-centos ~]# tar -jxvf firefox-59.0.2.tar.bz2 
firefox/libnssdbm3.so
firefox/dependentlibs.list
firefox/browser/omni.ja
firefox/browser/blocklist.xml
firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
firefox/browser/features/onboarding@mozilla.org.xpi
firefox/browser/features/formautofill@mozilla.org.xpi
...

Simples heim, veja a dica “brincando com o tar” e conheça algumas opções avançadas.

[]s 😉


138 Words

2021-07-24 17:14 +0000