Created
March 1, 2014 03:32
-
-
Save samos123/9284685 to your computer and use it in GitHub Desktop.
Had some problem with cado-nfs which had a bunch of gzipped files which were corruped so tried to decompress them, if the decompression failed it will automatically move the file to upper directory.
This file contains 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
ls *.gz -1 | xargs -I {} sh -c "gzip -d {} || true" 2>&1 | awk '{ print $2}' | sed 's/:$//' | xargs -t -I {} mv {} ../{}_bcorrupted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment