Last active
December 19, 2015 05:48
-
-
Save BrianRossmajer/5906386 to your computer and use it in GitHub Desktop.
This gist tests if a bzip file is complete. Since bzip2 --test actually decompresses the file (it's a real file test) it takes time and CPU. This shell snippet just looks for the bzip2 end-of-stream marker (See http://en.wikipedia.org/wiki/Bzip2#File_format). This was helpful when I was rsync'ing a directory of large bzip2 files over an unreliab…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -c 12 filename.bz2 |od -t xC| sed 's/ //g' | grep -q -E '2ee48a70a120|177245385090|5dc914e14240|bb9229c28480' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment