tar用绝对路径压缩或者解压的时候,会输出个提示:

tar: Removing leading `/' from member names

如何隐藏这个提示呢?很简单,加个P参数或者–absolute-names 即可,示例:

tar fczP bkup.tar.gz /home/foo/

tar fcz bkup.tar.gz --absolute-names /home/foo

方法来自:https://unix.stackexchange.com/questions/59243/tar-removing-leading-from-member-names#answer-59244

Related Posts: tar指令如何隐藏tar: Removing leading `/’ from member names的提示 :

avatar