carlsson
Veteran Member
Although not neccessarily vintage, I came upon a small tool today which may be handy in some situations. Like what I did:
I'm migrating from an old server to elsewhere, and had packed all the files into neat tar.gz and similar packages. I used FTP to transfer files from the server to my local computer. When everything was transferred, I ran "rm -f *" on the non-backed up server. Then I realized that all my files, a couple of hundred MB, had been transferred in ASCII mode! Horror!
Were all my files lost forever? Not only would an ASCII transfer convert line breaks, but presumably strip away the 8th bit from the data too. I start looking on Internet for any salvation tool to try, but the initial reports were pessimistic.
Then I came upon GZip's own homepage, http://www.gzip.org/ which has a very simple tool to un-convert line breaks -- fixgz, available both as C source and Windows binary. It was my last resort, and believe me or not, all files appear to be perfectly salvagable only by taking that measure. I'm not sure if it is due to the properties of GZip files or that the FTP server and/or client was clever enough to transfer files as 8-bit text rather than 7-bit ASCII.
I don't know if all files are 100% OK, but much closer to being OK now than right after the transfer. Phew. Maybe it is a good advice for someone else who does a FTP or other transfer blunder..
I'm migrating from an old server to elsewhere, and had packed all the files into neat tar.gz and similar packages. I used FTP to transfer files from the server to my local computer. When everything was transferred, I ran "rm -f *" on the non-backed up server. Then I realized that all my files, a couple of hundred MB, had been transferred in ASCII mode! Horror!
Were all my files lost forever? Not only would an ASCII transfer convert line breaks, but presumably strip away the 8th bit from the data too. I start looking on Internet for any salvation tool to try, but the initial reports were pessimistic.
Then I came upon GZip's own homepage, http://www.gzip.org/ which has a very simple tool to un-convert line breaks -- fixgz, available both as C source and Windows binary. It was my last resort, and believe me or not, all files appear to be perfectly salvagable only by taking that measure. I'm not sure if it is due to the properties of GZip files or that the FTP server and/or client was clever enough to transfer files as 8-bit text rather than 7-bit ASCII.
I don't know if all files are 100% OK, but much closer to being OK now than right after the transfer. Phew. Maybe it is a good advice for someone else who does a FTP or other transfer blunder..