Tuesday, March 7, 2017

TAR useful commands

Compress current directory into archive.tgz (verbose)

tar -czvf archive.tgz *

Compress xfiles directory into archive.tgz (verbose)

tar -czvf archive.tgz xfiles/

Extract archive.tgz into current directory

tar -xzvf archive.tgz

Extract archive.tgz into xfiles directory

tar -xzvf archive.tgz -C /xfiles/

Slightly modified from this blog post

No comments:

Post a Comment