Thursday, May 22, 2008

tar --help

Create tar archive
==================

tar -cvf back_htdoc.tar htdocs/
tar -zcvf back_htdoc.tar.gz htdocs/

-c for create a new archive
-v for create a new archive
-f for use archive file or device ARCHIVE
-j, --bzip2 for filter the archive through bzip2
-z, --gzip, for filter the archive through gzip



un-tar
======

tar -xf back_htdoc.tar

-x for extract archive
-f for use archive file or device ARCHIVE
-z, --ungzip filter the archive through gzip

list files in tar
=================

tar -tvf archive.tar

-t for list
-v for create a new archive
-f for use archive file or device ARCHIVE

No comments: