LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   FTP in Konsole gives corrupt data (http://www.linuxquestions.org/questions/linux-newbie-8/ftp-in-konsole-gives-corrupt-data-536116/)

benny_j 03-09-2007 06:04 PM

FTP in Konsole gives corrupt data
 
Have U ever had a problem with the data downloaded from an ftp-server getting corrupted in some way, when using the ftp command in the Konsole? No report of failure was given on my end, nor at the ftp.

*I use Kubuntu 6.10 (Edgy) x86_64 on a HP Pavilion zv6000.

**Note that the file works fine when getting it from the same ftp with konqueror.

Any answer would B most welcome.

/Benny

dannystaple 03-09-2007 06:11 PM

Quote:

Originally Posted by benny_j
Have U ever had a problem with the data downloaded from an ftp-server getting corrupted in some way, when using the ftp command in the Konsole? No report of failure was given on my end, nor at the ftp.

*I use Kubuntu 6.10 (Edgy) x86_64 on a HP Pavilion zv6000.

**Note that the file works fine when getting it from the same ftp with konqueror.

Any answer would B most welcome.

/Benny

Benny,

When using the command line ftp from a shell, you may need to set the file mode. FTP file modes can be ascii or binary.
Ascii files will mean it expects texts, and may perform changes to line ending characters (0xD and 0xA) to adapt them to unix line endings, and may even optionally strip off the 8th bit. This will seriously mess up binary data.
Merely typing "bin" before using "get" to retrieve the file should set it to binary mode.
Does that help?

More often, when just grabbing an anonymous file from a site, I will use wget for it. I normally only use the full command line FTP client for sessions requiring passwords etc..

Danny

benny_j 03-10-2007 04:08 AM

Thank you very much Danny!

That solved it!
There's a whole new world out there, and it's called Linux. :)

/Benny


All times are GMT -5. The time now is 03:14 PM.