ftp - determine ascii or binary file

Hello,

How to i determine via ftp commandline if files on ftp server is ascii or binary files. Like every other comon windows ftp program does it automatically.

regards
Thomas

There isn't such from FTP command line, instead, you should rely on their extensions. Even when you turn on debug and verbose, no useful information of that matter will be printed. You can only change the type of transfer from ascii to binary and vice-versa.

Administrator sets format (ASCII/BIN) on FTP server.

you can switch what ever you want...by asc and bin command

asc for ASCII
bin for Binary

Most of those windows GUI clients guess the file type based on the file's extention. Try:
echo "hello" > hello.txt
echo "hello" > hello.gif
and then view the files in ftp GUI window. Most GUI clients will think that the first file is ascii and the second file is binary. You can emulate this behavior by making similiar guesses.

i find that a bit too unprecise as i have millions of files, and cannot risc any of them to be corrupt.
As my purpose is to continously backup my NAS (allnet 6200) perhaps i could use some samba or whats it called (in ms world its called map network drive) - is it possible to mount a NAS as external filesystem in freeBSD ?

If your purpose is to back up the files, then copy them all as binary, and restore them all as binary, then there is no conversion or corruption to worry about.