Save Efforts while extracting

We can extract our tar archived file to our required destination with using copy and all in single shot.

cd /to/where/archived/file.gz

tar -xzf filename.gz -C /destnation/dir/ ; cd /destination/dir/


it will extract the file in the path given like /destination/dir/ and cd will change your dir to that dir.

e.g

cd Downloads
tar -xzf zabbix-2.6.gz -C /opt/ ; cd /opt/zabbix-2.6/
pwd
/opt/zabbix-2.6

Comments

Popular posts from this blog

How to delete SEA in VIOS

More VIOS commands

Webmin configuration for LDAP