Linux tar Command Notes

From myWiki

Create archive and compress with gzip

tar -cvzf MyImages-14-09-12.tar.gz /home/MyImages

Untar files in Current Directory

tar -zxvf public_html-14-09-12.tar

Untar files in specified Directory

tar -zxvf public_html-14-09-12.tar -C /home/public_html/videos/

Parameters

c – create a archive file.
x – extract a archive file.
v – show the progress of archive file.
f – filename of archive file.
t – viewing content of archive file.
j – filter archive through bzip2.
z – filter archive through gzip.
r – append or update files or directories to existing archive file.
W – Verify a archive file.
wildcards – Specify patters in unix tar command.