To upload a file via FTP in binary mode, try the following command, using the venerable cURL utility:
curl -v -1 -T mybinary.file --ftp-pasv -u user:password -Q "TYPE I" "ftp://ftp.example.com"
The magic is in the -Q option, which sends the proceeding text as an FTP raw command. In this example, we send the “TYPE I” command, which sets the transfer type to “binary image mode”.
Alternatively, to download a remote file use:
curl -v -1 -O mylocalbinary.file --ftp-pasv -u user:password -Q "TYPE I" "ftp://ftp.example.com/myremotebinary.file"
cURL is incredibly versatile and well worth investigating for all manner of remote file wrangling.