[[email protected] ~]# tar -zpcv -f /root/etc.tar.gz /etc [[email protected] ~]# tar -jpcv -f /root/etc.tar.bz2 /etc [[email protected] ~]# ll /root/etc* [[email protected] ~]# tar -jtv -f /root/etc.tar.bz2 [[email protected] ~]# tar -jpPcv -f /root/etc.and.root.tar.bz2 /etc [[email protected] ~]# tar -jtf /root/etc.and.root.tar.bz2 [[email protected] ~]# tar -jxv -f /root/etc.tar.bz2 [[email protected] ~]# tar -jxv -f /root/etc.tar.bz2 -C /tmp [[email protected] ~]# ll /tmp 总计 4 drwxr-xr-x 84 root root 4096 10-30 16:55 etc [[email protected] ~]# rm -rf /root/etc /tmp/etc [[email protected] ~]# ll /tmp 总计 0 [[email protected] ~]# tar -jtv -f /root/etc.tar.bz2 | grep "shadow" -r-------- root/root 885 2014-10-15 23:24:50 etc/shadow -rw------- root/root 485 2014-09-14 00:46:43 etc/gshadow- -r-------- root/root 496 2014-10-15 23:24:50 etc/gshadow -r-------- root/root 863 2014-09-17 18:05:30 etc/shadow- [[email protected] ~]# tar -jxv -f /root/etc.tar.bz2 etc/shadow etc/shadow [[email protected] ~]# ll etc 总计 4 -r-------- 1 root root 885 10-15 23:24 shadow [[email protected] ~]#
时间: 2024-10-15 16:28:35