How to decompress the previous directory without tar

 

Can be packaged without parent directory. Use * in the directory.

Replace tar cvf zhiban.tar /root/zhiban with
:
cd /root/zhiban
tar cvf zhiban.tar *

[root@localhost etc]# cd /etc/

[root@localhost etc]# tar -zcf passwd.tar.gz passwd gshadow

[root@localhost etc]# tar -xf passwd.tar.gz -C /mnt

[root@localhost etc]# ls /mnt/
gshadow passwd

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325306624&siteId=291194637