• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

PITA issue w/transferring PHP and javascript .js files from Linux box to windows

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

magellan

Member
Joined
Jul 20, 2002
I'm using zmodem to xfer these text files and they always end up mangled on the
windows box, I'm guessing CR/LF's are being stripped on the file xfer. Is there
anyway to avoid this? Would an xmodem xfer make any diff? FTP is strictly out.
Too bad windoze doesn't have scp, which always works for me in any *ix environment
I've ever used (incl. AIX).
 
Er, get putty, use SCP.. Xmodem/Zmodem (pfft, Ymodem-G FTW) have been dead for over a decade :p
 
Windows does have SCP, or at least a free SCP you can get. WinSCP. I use it all the time when I have to SCP into my ESXi box or a Linux host.
 
Xmodem works with the -a switch, although there's still some bizarre characters now introduced at the end of the file.
From what I understand this whole issue is because in *ix the newline character is a LF, but in windows
a newline corresponds to two characters CR and LF. But how would using the ASCII switch ( -a ) with xmodem fix this issue? The documentation states that this switch changes CR/LF to LF (on my CentOS box), so is it doing the reverse on my windows SSH client (SecureCRT) (i.e. turning LF's into CR/LF pairs)?

- - - Updated - - -

Xmodem works with the -a switch, although there's still some bizarre characters now introduced at the end of the file.
From what I understand this whole issue is because in *ix the newline character is a LF, but in windows
a newline corresponds to two characters CR and LF. But how would using the ASCII switch ( -a ) with xmodem fix this issue? The documentation states that this switch changes CR/LF to LF (on my CentOS box), so is it doing the reverse on my windows SSH client (SecureCRT) (i.e. turning LF's into CR/LF pairs)?
 
Use pscp and call it a day. Syntax is nearly identical to scp, and it's portable. Can also be used with stored putty sessions or PKA.
 
If you use a binary file transfer it shouldn't muck about with line endings. I'm unfamiliar with zmodem/xmodem, but there should be a binary option in them. scp should work w/o any special options set.
 
Back