How to check if a Unix .tar.gz file is a valid file without uncompressing?

后端 未结 8 1527

I have found the question How to determine if data is valid tar file without a file?, but I was wondering: is there a ready made command line solution?

8条回答
  •  攒了一身酷
    2020-11-30 20:41

    You can also check contents of *.tag.gz file using pigz (parallel gzip) to speedup the archive check:

    pigz -cvdp number_of_threads /[...]path[...]/archive_name.tar.gz | tar -tv > /dev/null
    

提交回复
热议问题