Operating System - HP-UX
1753325 Members
4579 Online
108792 Solutions
New Discussion юеВ

Transfer files from Unix Server to PC

 
yanfeng Zhou
Occasional Advisor

Transfer files from Unix Server to PC

Hi, All:

I have a quesstion need your help. I'm trying to find a way to transfer a file from unix server to pc in unix command line. I've checked my books shipped with machine. But failed to find a solution. My unix host is HP 9000 K420 with HP unix 10.20. My pc is windows serials.

Thanks & Regards,
16 REPLIES 16
Bill Hassell
Honored Contributor

Re: Transfer files from Unix Server to PC

Windows doesn't normally have Unix daemons for ftp or rcp so you'll have to read up on your version of Windows to enable incoming ftp or rcp. ftp requires several commands so a one-line command won't be possible but a script is easy (see attachment here). rcp will have problems with user authentication between the systems but should eventually work.


Bill Hassell, sysadmin
Sukant Naik
Trusted Contributor

Re: Transfer files from Unix Server to PC

Hi

I have installed CIFS, which is SAMBA for HP-UX on my server.

So I create smb shares and then browse from the PC.

-Sukant
Who dares he wins
yanfeng Zhou
Occasional Advisor

Re: Transfer files from Unix Server to PC

Hi,

Thanks, Bill and Sukant. Both of your solution can approach my request. But I'm looking for a more simple way. I found there's a tool named "kermit" on unix, and I've tried this tool, but I fail to transfer file to PC. The message is as following:

"KERMIT READY TO SEND...
8 Sz/ @-#Y3~^! z0___D"U1A"

Can you help me?


Thanks & Regards,
Stefan Saliba
Trusted Contributor

Re: Transfer files from Unix Server to PC

I think bill's and Suktant are indeed the best solutions.

Well if you want to use kermit then I think that will limit you to the serial line speed. If you have large files to transfer it will take ages.

Let me re-phrase what they suggested in simpler terms.


Go to http://www.download.com and get a freeware version of any FTP server for windows. This is a program which will accept ftp requests on the windows side. There are many around, some are freeware.

Then simply use ftp on the UNIX server to transfer files. You will get faster speed then serial for sure and much more flexible and hassle free.

Suktant solution works but may get a bit hairy to configure, so given you want a simple solution I go for ftp.


Good luck

Stefan


Scott Van Kalken
Esteemed Contributor

Re: Transfer files from Unix Server to PC

#!/bin/sh
set -x
ftp -i -n << !EOF
open 10.196.8.241
user anonymous scott@unix.com
lcd /tmp
cd /foo
bin
mput *
bye
!EOF


That should do the job.

This is essentially what I use to transfer omniback reports from my unix box the an IIS web server.

Though it took me MONTHS to get the windows guys to understand that i wanted FTP access and not file copy via a mapped drive.

yanfeng Zhou
Occasional Advisor

Re: Transfer files from Unix Server to PC

Hi Stefan:

Thanks for your reply first. Maybe I did not explain the background of my problem. I have a ERP system named MFG/PRO running on HP Unix. The ERP system can generate some report by the end user. And the user have to use a ftp client to download the report to their PC for further use.(This is the way what we using now) But, many user are not familiar with ftp client, due to the employees in/out is frequent here. So I'm seeking a way to let the use just click a button or make a choice, the system will transfer the file to the users' PC automaticly. If I use a ftp server on local, I have to teach 2 things to my users, first, how to use ftp under unix(it's impossible, we do not allow the user to go to the unix command line for security), second, setup ftp server on PC. That's far from what I want to get.

And about the traffic of the file transfer, I think it is not a problem currently, for the ERP report won't be large than 1M normally.

Please advise.

Thanks & Regards,
Scott Van Kalken
Esteemed Contributor

Re: Transfer files from Unix Server to PC

You may want to consider using either samba or NFS.

We run Novell here and have set up an NFS gateway where unix filesystems appear in explorer. We can map them as drives etc...

Another solution would be to use samba, which can be obtained from http://www.software.hp.com

Another solution is to email the report to your people

you can use:

uuencode report report.txt | mailx -m foo@foo.org

This will mail the report as an attachment.

We use this also for certain jobs because people are more comfortable receiving an attachment.

Scott.
yanfeng Zhou
Occasional Advisor

Re: Transfer files from Unix Server to PC

Hi, Scott:

Thanks, I'll try your solution.

Thanks again.
Keely Jackson
Trusted Contributor

Re: Transfer files from Unix Server to PC

Hi

Does it have to be via unix command line? If not, do your users use Reflection or something similar to access MFG/Pro. We wrote a very simple reflection macro or script to do the file transfer for you using the WRQ/ftp transfer part of reflections. Then the users just have to click on a button on the screen and enter the file name to be copied.

The other option we used to use was to set up a print location within mfg/pro of emailme which called a script to e-mail the reports directly to their pc.

Cheers
Keely
Live long and prosper