Linux Command - tar

 

How to use tar

1, Compress file as foo.tar.bz2 

$ tar -cjvf ${files} foo.tar.bz2

 

2 Uncompress the foo.tar.ba2 to foo dir

$ tar -jxvf foo.tar.bz2 -C foo

 

3, List the compressed foo.tar.bz2

$ tar -tvf foo.tar.bz2