Re: ASCII text garbled on FTP download?
From: Bill S. (ziphem_at_hotmail.com)
Date: 04/16/04
- Next message: Bryan: "reloading a process by pid"
- Previous message: Mattias Honrendgard: "Re: Graphics card Problems"
- In reply to: root: "Re: ASCII text garbled on FTP download?"
- Next in thread: root: "Re: ASCII text garbled on FTP download?"
- Reply: root: "Re: ASCII text garbled on FTP download?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 Apr 2004 02:55:02 -0700
Thanks for the response. Ok basically my question is about carriage
returns. What I meant in they "never come out of linux" is this: I
sit here at home on my Windows XP machine. I want to move my files,
say 1.html, 1.gif and 1.cgi, from Server 1 to Server 2, both 3,000
miles away from me, and away from each other. The files are in /home
on Server 1 and I want to put them in the same location on Server 2
(/home).
I ssh into Server 1. I cd /home, and type "tar cvf compressedfile *"
I exit.
I ssh into Server 2. I:
mkdir /home
cd / home
ftp
open Server 1, login, cd /home
get compressedfile
exit
Ok, so then I "tar xvf compressedfile"
I have then, in Server 2's /home, 1.html, 1.gif, and 1.cgi
I exit ssh, all done.
Ok, I am still at my Windows XP pc as the weather is bad and I don't
want to go outside. I have no umbrella, and I hate getting drenched.
I then run ws_ftp. I have 1.html, 1.gif and 1.cgi in my ws_ftp
directory. Originally, 7 years ago, I uploaded them to Server 1,
1.gif in binary and 1.cgi and 1.html in ASCII.
So to remember what 1.cgi looked like, I go to view, & it's opened in
notepad.exe. I see:
Version Info ###
$YaBBversion = '1 Gold - SP 1.1';
$YaBBplver = '1 Gold - SP 1.1';
if( $ENV{'SERVER_SOFTWARE'} =~ /IIS/ ) {
$yyIIS = 1;
$0 =~ m~(.*)(\\|/)~;
$yypath = $1;
$yypath =~ s~\\~/~g;
chdir($yypath);
push(@INC,$yypath);
}
### Requirements and Errors ###
use CGI qw(header cookie); # so we can use the header and cookie
printing
use CGI qw/:standard/;
$CGI::HEADERS_ONCE = 1; # Kill redundant headers
require "Settings.pl";
require "$language";
require "$sourcedir/Subs.pl";
require "$sourcedir/Load.pl";
require "$sourcedir/Security.pl";
I ftp into Server 1, download 1.cgi in ASCII and view it, and see the
same as 1.cgi originally on my Windows XP, from 7 years ago.
I ftp into Server 2, download the file in ASCII, the same way. I see
something a bit like:
Version Info ###$YaBBversion = '1 Gold - SP 1.1';$YaBBplver = '1 Gold
- SP 1.1';
if( $ENV{'SERVER_SOFTWARE'} =~ /IIS/ ) { $yyIIS = 1; $0 =~
m~(.*)\\|/)~; $yypath = $1; $yypath =~
s~\\~/~g; chdir($yypath); push@INC,$yypath);}### Requirements and
Errors ###use CGI qw(header cookie); # so we can use the header and
cookie printinguse CGI qw/:standard/;$CGI::HEADERS_ONCE = 1; # Kill
redundant headers require "Settings.pl";require "$language";require
"$sourcedir/Subs.pl";require "$sourcedir/Load.pl";require
"$sourcedir/Security.pl"; # Those who write software only for pay
should go hurt some other field. # - Erik Naggum
&LoadCookie;
When I pasted the above directly here, in this window, it formatted
like how it looks from Server 1 or on my Windows XP. However, sitting
in notepad.exe, even cut and re-pasted, the formatting is garbled, in
that the carriage returns do not display well.
So I was wondering why this was the case and if there is anything I
can do about this, rather than cutting out the ill formatted ascii
files, pasting them somewhere to get the formatting back, then
repasting them into notepad, and re-uploading them.
Thanks!!
root <root@home.com> wrote in message news:<pan.2004.04.16.00.27.31.222373@home.com>...
> On Thu, 15 Apr 2004 16:54:35 -0700, Bill S. wrote:
>
> > Ok, I think my first post could have been better written & more clear - I
> > hope this is; I transfered the tar between the two servers as binary. I
> > have 2 servers (virtual), cause I'm moving everything from one to another.
> > It's all done from Redhat to Redhat, no Windows involved.
> >
> > When I download & look at, say, the cgi file on the old server with wsftp,
> > from my home Windows PC, it comes out formatted ok. After I tarred it,
> > transferred it, & untarred it between Servers (both RH), I download & view
> > it from the new server with my Windows PC. The formatting now is all
> > messed up (carriage returns like you said). From tarring, transferring,
> > the untarring, the files never came out of Linux.
> >
> > So I don't understand, why this problem? See, when I log into the servers
> > - both - and look at these files using Pico, their format is the same -
> > ungarbled.
> >
> > So why after I tar and transfer between the servers does this changes how
> > Windows (not RH) displays the files?
> >
> > Thanks!!!
> >
>
> Ok ... this is still not clear.
> If they "never come out of linux" then what has wsftp got to do with this.
> At some point the Windows ftp client is using ASCII ???
>
> Create a tar file on linux machine 1
> On machine 1 run "md5sum tarfile" and note it down Call it (A)
> Now ftp file to linux machine 2
> from linux machine 2 run "md5sum tarfile" again note it down (B)
> Now ftp the file to the windows machine
> From the windows machine ftp the tar file BACK to machine 2 (C)
> From machine 2 run "md5sum tarfile"
>
> I am willing to bet the the md5sums for (A) and (B) are the same but (C)
> is different.
>
> Jon
- Next message: Bryan: "reloading a process by pid"
- Previous message: Mattias Honrendgard: "Re: Graphics card Problems"
- In reply to: root: "Re: ASCII text garbled on FTP download?"
- Next in thread: root: "Re: ASCII text garbled on FTP download?"
- Reply: root: "Re: ASCII text garbled on FTP download?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|