CentOS Linux Server Guide

Extract archive file using Tar command  in CentOS Linux

Tar

  • Both compressing and  extracting  of a tar archive use the same command

Synopsis

tar [option] archivefile.tar

 

Option

x     extract files from archive

v     verbose, detail output of files from archive

f      specify the given archive

-C     specify the target location for extracted file

 

note

 

Example

The following command will extract the log.tar archive to current directory
tar xvf log.tar

 

The following command will extract the log.tar archive to test directory
tar xvf log.tar -C /test

 

Back to File Compression and Archiving



Copyright 2011 http://www.1a-centosserver.com All Rights Reserved

All trademarks are the property of their respective owners.

Contact Us | Terms of Use | Privacy Policy