1
I'm using Curl to send a file over FTP. It is just a generated text file from a screen hardcopy command. When I cat the file, it displays correctly, it looks like this:
System up for 14844
1, 0000, R D S, 0, 0, x, 0.00
2, 0000, R D S, 0, 0, x, 0.00
3, 0000, R D S, 0, 0, x, 0.00
4, 0000, R D S, 0, 0, x, 0.00
However when I look at the transferred file, it is all on 1 line. Any way to fix this? Is there a command line option? This is my curl command:
curl -T ~/hardlog.log ftp://10.0.0.7 --user user:secret
Thanks
1
Are you viewing the file on the same OS? I asked because usually you get these symptoms when a file gets transferred without any changes (you can check this, their MD5sums should be the same). However your client displays the text differently. This can happen if you transfer a file from a unix like OS (which uses linefeed at the end of a line to start at a new line) to a windows or DOS like OS (which requires both LF and CR). http://en.wikipedia.org/wiki/Newline has more information on this.
– Hennes – 2013-07-23T20:09:42.083