bash - ftp appends ^M to .Z file -


i doing ftp in binary mode , downloading compressed_file.z compressed_file.z^m , when using dos2unix creates new file ^m removed still when try uncompress it, error saying corrupt input or its not recognized tar file etc. if paste in windows machine using filezila, able open 7z. have used sed 's/^m$//' compressed_file.dmp.z^m>compressed_file.dmp.z still corrupt file. has faced similar issue?

it's it's filenames contains ^m @ end. rename them with:

for in *.z$'\x0d';     mv -i "$a" "${a%?}"  # remove -i skip confirmation done 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -