what is the default when transferring files t

April 14, 2011 at 14:00:05
Specs: Unix
I have file transfers to Unix but there is no definition on if it should go ascii or binary. What is the default?

See More: what is the default when transferring files t

Report •

April 14, 2011 at 14:18:37
I am making an assumption that you are transferring files to unix using FTP? FTP generally defaults to ASCII. I ftp plain text, ASCII files from a Windows XP machine to a Solaris 9 box, and the ftp, by default, transfers the file and does the end of line and end of file translation, but I wouldn't count on it. I would check it out just to be sure.

If you are not aware, window terminates lines with a Carriage Return/Line Feed and a Control-Z end of file marker. *nix uses only a Line Feed and no end of file marker. It's not uncommon for new folks to move files to Unix and end up with a ^M.

The dos2unix command eliminates this or you can use a unix shell script as defined here:


Report •

April 14, 2011 at 14:21:48
hi, i didn't mention that it is connect/direct. would the default still be ascii?

Report •

April 14, 2011 at 15:16:55
I don't know what you mean by direct/connect? You mean direct/connect using ftp?

Why don't you run a test.

For example, let say your test file is called mytext.txt with these two lines:

This is line 1
and this is line 2

Now, move it to the unix box. In the unix directory where the file exists, execute the octal dump, od, command:

od -c mytext.txt

If your output doesn't look like this, then you have a problem:

0000000   T   h   i   s       i   s       l   i   n   e       1  \n   a
0000020   n   d       t   h   i   s       i   s       l   i   n   e    
0000040   2  \n

Report •

Related Solutions

April 14, 2011 at 15:21:14
thanks, i'll give it a shot...

Report •

April 14, 2011 at 16:25:25
Thanks. Your suggestion worked and I have my answer.

Report •

Ask Question