1832219 Members
2676 Online
110041 Solutions
New Discussion

FTP problem

 
SOLVED
Go to solution
Cara Tock
Regular Advisor

FTP problem

I need to be able to ftp a file from machine to another. The machine that I am ftp'ing from is a N4000 running HP-UX 11.0. When I ftp the file using get "filename", it comes as one single line. I need to be able to get 288 characters at a time and then append a newline character. I have tried both ascii and binary.
Thanks
6 REPLIES 6
Sachin Patel
Honored Contributor

Re: FTP problem

Can you do rcp if it is just one file?

#rcp file remsys:/tmp

Sachin
Is photography a hobby or another way to spend $
Steven E. Protter
Exalted Contributor

Re: FTP problem

I would suggest SSH.

Secure Shell has a command called scp

After an exchange of public keys it works nicely in scripts.

This thread has the cookbook.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xe51e5bd3782dd711abdc0090277a778c,00.html

Download HP-UX Secure Shell from:
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=T1471AA

Installation procedure is available at the :
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=T1471AA&oper=install

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
Cara Tock
Regular Advisor

Re: FTP problem

I don't have any access to the box other than ftp. The problem still remains that the file is one huge line and I need it to be seperated into lines 288 characters in length.
John Dvorchak
Honored Contributor

Re: FTP problem

I don't believe that it is an ftp issue. FTP doesn't modify the files, it only transfers them. If you need the file to be only 288 chars long per line then you will have to either make sure that it is modified before being ftp'ed or after. Since you don't have access to the HPUX box, it would appear that you will have to modify the file after it is transferred to you.
If it has wheels or a skirt, you can't afford it.
Bill Hassell
Honored Contributor
Solution

Re: FTP problem

ftp will transfer the file correctly using binary mode. Unix doesn't really understand lines in a binary file, so all the data is there. Just use the fold command to break up the file into 288char lines.


Bill Hassell, sysadmin
Cara Tock
Regular Advisor

Re: FTP problem

Fold is the command that I needed. I was thinking of using split in some fashion, but it breaks things up into individual files. Thanks