Tar error: Unexpected EOF in archive

前端 未结 5 1490
挽巷
挽巷 2021-02-13 01:49

I tar a directory full of JPEG images:

tar cvfz myarchive.tar.gz mydirectory

When I untar the archive:

tar xvfz myarchive.tar         


        
5条回答
  •  不思量自难忘°
    2021-02-13 02:02

    I had a similar problem with truncated tar files being produced by a cron job and redirecting standard out to a file fixed the issue.

    From talking to a colleague, cron creates a pipe and limits the amount of output that can be sent to standard out. I fixed mine by removing -v from my tar command, making it much less verbose and keeping the error output in the same spot as the rest of my cron jobs. If you need the verbose tar output, you'll need to redirect to a file, though.

提交回复
热议问题