tar: Removing leading `/' from member names

tar 备份打包时,默认为相对路径;而排除匹配式默认也是全路径匹配的所以,在打包时,会提示:“tar: Removing leading `/' from member names”除非你使用-P参数或特定的参数指定

 

 

[root@erpdataserver kkg]# tar zcvfP kkg.tar.gz /home/kkg
/home/kkg/
/home/kkg/.canna
/home/kkg/a/
/home/kkg/alarm.log
[root@erpdataserver kkg]# tar ztvf kkg.tar.gz
drwxr-xr-x jiankong/jiankong 0 2009-02-09 09:38:48 /home/kkg/
-rw-r--r-- kkg/kkg        5619 2009-02-09 09:08:21 /home/kkg/.canna
drwxr-xr-x root/root         0 2009-01-01 20:32:55 /home/kkg/a/
-rw-r--r-- kkg/kkg        4027 2009-02-09 08:30:02 /home/kkg/alarm.log

应该要加大P

你可能感兴趣的:(tar: Removing leading `/' from member names)