美文网首页
tar: .: file changed as we read

tar: .: file changed as we read

作者: 此昵称已被狗抢占 | 来源:发表于2020-12-08 00:43 被阅读0次

    https://stackoverflow.com/questions/20318852/tar-file-changed-as-we-read-it

    因为压缩过程中压缩文件已经创建,压缩当前目录会包含压缩文件自己,导致了这个警告

    解决方法1

    mkdir artefacts
    tar -zcvf artefacts/archive.tar.gz --exclude=./artefacts .
    echo $?
    0
    

    解决方法2

    touch archive.tar.gz
    tar --exclude=archive.tar.gz -zcvf archive.tar.gz .
    echo $?
    0
    

    相关文章

      网友评论

          本文标题:tar: .: file changed as we read

          本文链接:https://www.haomeiwen.com/subject/nsoxgktx.html