- Techie Buzz - http://techie-buzz.com -
Fix Corrupted Zip Files in Linux [Quick Tip]
Posted By Keith Dsouza On July 17, 2008 @ 7:12 am In Linux Tips | 2 Comments
1: unzip -tqqq $x >> /dev/null;
2: if [ $? -ne 0 ]; then
3: #Run Recovery mode first - do not remove this code - kd
4: zip -FF $x;
5: unzip -tqqq $x >> /dev/null;
6: if [ $? -ne 0 ]; then
7: echo "Could not unzip $x. Renaming it to BADZIP-$x";
8: mv $x BADZIP-$x;
9: continue;
10: fi
11: fi
Article printed from Techie Buzz: http://techie-buzz.com
URL to article: http://techie-buzz.com/linux-tips/fix-corrupted-zip-files-in-linux-quick-tip.html
URLs in this post:
[1] Linux Tips: http://technorati.com/tags/Linux+Tips
[2] Recover Zip Files: http://technorati.com/tags/Recover+Zip+Files
[3] Linux Zip Files: http://technorati.com/tags/Linux+Zip+Files
[4] Corrupted Zip Files: http://technorati.com/tags/Corrupted+Zip+Files
[5] Zip Files: http://technorati.com/tags/Zip+Files
Click here to print.
Copyright © 2009Techie Buzz. All rights reserved.