[root@kvm8 ~]# tar jcvf testbin.tar.bz2 /usr/local/bin tar: Removing leading `/' from member names /usr/local/bin/ /usr/local/bin/ex200 /usr/local/bin/garmin [root@kvm8 ~]# ll test* -rw-r--r--. 1 root root 20480 Oct 30 17:07 testbin.tar -rw-r--r--. 1 root root 4332 Oct 30 17:11 testbin.tar.bz2 -rw-r--r--. 1 root root 10240 Oct 30 17:07 test.tar -rw-r--r--. 1 root root 5 Oct 30 15:59 test.txt
[root@kvm8 ~]# tar zcvf testbin.tgz /usr/local/bin tar: Removing leading `/' from member names /usr/local/bin/ /usr/local/bin/ex200 /usr/local/bin/garmin [root@kvm8 ~]# ll test* -rw-r--r--. 1 root root 20480 Oct 30 17:07 testbin.tar -rw-r--r--. 1 root root 4332 Oct 30 17:11 testbin.tar.bz2 -rw-r--r--. 1 root root 4209 Oct 30 17:12 testbin.tgz -rw-r--r--. 1 root root 10240 Oct 30 17:07 test.tar -rw-r--r--. 1 root root 5 Oct 30 15:59 test.txt
[root@kvm8 ~]# tar Jcvf testbin.tar.xz /usr/local/bin tar: Removing leading `/' from member names /usr/local/bin/ /usr/local/bin/ex200 /usr/local/bin/garmin [root@kvm8 ~]# ll test* -rw-r--r--. 1 root root 20480 Oct 30 17:07 testbin.tar -rw-r--r--. 1 root root 4332 Oct 30 17:11 testbin.tar.bz2 -rw-r--r--. 1 root root 3560 Oct 30 17:13 testbin.tar.xz -rw-r--r--. 1 root root 4209 Oct 30 17:12 testbin.tgz -rw-r--r--. 1 root root 10240 Oct 30 17:07 test.tar -rw-r--r--. 1 root root 5 Oct 30 15:59 test.txt