Operating System - Linux
1753735 Members
4488 Online
108799 Solutions
New Discussion юеВ

Re: In FTP Line count Differs

 
ramadashsuresh
Frequent Advisor

In FTP Line count Differs

Hi,

I have one text file with 3 lines (eg) , but when a transfer it to local machine through FTP I found one additional blank line. Let me know Why it is happening and How to get exact lines as the source text file.

Thanx
suresh
8 REPLIES 8
Stuart Browne
Honored Contributor

Re: In FTP Line count Differs

Transfer the file in BINARY mode instead of ASCII mode.
One long-haired git at your service...
ramadashsuresh
Frequent Advisor

Re: In FTP Line count Differs

i transfer both the mode but no expected result
Vitaly Karasik_1
Honored Contributor

Re: In FTP Line count Differs

Hmmm....

Can you re-check that your file was really transferred between two boxes?
Do both systems run linux?
Jeroen Peereboom
Honored Contributor

Re: In FTP Line count Differs

Can you count characters in stead of lines?
Are you sure your editor / viewer does not add the extra newline for you?

Transfer from system a -> b -> a.
If the files are the same, your problem is not ftp.

JP
ramadashsuresh
Frequent Advisor

Re: In FTP Line count Differs

from windows to linux import the files through ftp while import the file bytes are same in both os in mode of binary
Steven E. Protter
Exalted Contributor

Re: In FTP Line count Differs

Shalom,

Few ideas here.

The Windows ftp client defaults to ascii and mangles binary files when you transfer them in ascii mode.

Using sftp part of openssh, which is standard with Linux and can be added for free to Windows solves this problem because sftp is smart enough to not mangle files.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeroen Peereboom
Honored Contributor

Re: In FTP Line count Differs

Suresh,

did you solve your mystery?

JP
ramadashsuresh
Frequent Advisor

Re: In FTP Line count Differs

No i am tried all the suggestion