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

后端 未结 8 1590

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:50

    I have tried the following command and they work well.

    bzip2 -t file.bz2
    gunzip -t file.gz
    

    However, we can found these two command are time-consuming. Maybe we need some more quick way to determine the intact of the compress files.

提交回复
热议问题