Operating System - HP-UX
1753742 Members
4912 Online
108799 Solutions
New Discussion юеВ

Re: Can copy a file in a ftp session?

 
Steven Schweda
Honored Contributor

Re: Can copy a file in a ftp session?

> The word "only" is a dangerous thing.

alp $ ftp dy
220 dy.antinode.info FTP server (Version 1.1.214.4(PHNE_36129) Mon Apr 23 13:44:
14 GMT 2007) ready.
Connected to dy.antinode.info.
Name (dy.antinode.info:sms):
331 Password required for sms.
Password:
230 User sms logged in.
FTP> cd ftpt
250 CWD command successful.
FTP> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /usr/bin/ls.
total 16
-rw-r--r-- 1 sms sys 5 Dec 9 23:13 a_file

226 Transfer complete.
76 bytes received in 00:00:00.00 seconds (724.79 Mbytes/s)
FTP> quote site exec cp -p a_file copy_of_a_file
200-cp -p a_file copy_of_a_file
200 (end of 'cp -p a_file copy_of_a_file')
FTP> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /usr/bin/ls.
total 32
-rw-r--r-- 1 sms sys 5 Dec 9 23:13 a_file
-rw-r--r-- 1 sms sys 5 Dec 9 23:13 copy_of_a_file

226 Transfer complete.
150 bytes received in 00:00:00.00 seconds (1.40 Gbytes/s)
FTP> quote site exec uname -a
200-uname -a
200-HP-UX dy B.11.11 U 9000/785 2012616114 unlimited-user license
200 (end of 'uname -a')
FTP> quit
221 Goodbye.

Documentation on this stuff seems to be very
sparse, but, as usual, many things are
possible.
Fenglin
Regular Advisor

Re: Can copy a file in a ftp session?

Hi Steven

Thanks for your efforts. The server that I need to ftp to is not a HP-UX server. So on my side, your method does not work.

Anyway,my problem has been resolved in such a way that I don't need to do a copy.

Cheers
Feng Lin
Steven Schweda
Honored Contributor

Re: Can copy a file in a ftp session?

> The server that I need to ftp to is not a
> HP-UX server.

I tried to find this out, but as you may
recall,

> I don't know what this FTP server is.

I wasn't getting any help.

Note that wu-ftpd is available for systems
other than HP-UX, so "not HP-UX" is not
particularly useful information in this
context.

> Anyway,my problem has been resolved in such
> a way [...]

You're a man of many secrets.
Tingli
Esteemed Contributor

Re: Can copy a file in a ftp session?

You can use ! to execute shell command. For details, just go man ftp.

! [command [args]]
Invoke an interactive shell on the local machine. If there are arguments, the first is taken to be a
command to execute directly, with the rest of the arguments as its arguments.
Steven Schweda
Honored Contributor

Re: Can copy a file in a ftp session?

> You can use ! to execute shell command.
> For details, just go man ftp.

It never was really made clear (despite
repeated questions), but apparently the goal
was to do the copying on the FTP server, not
on the client.

Some forum users seem to be chronically
unable to pose a question well. These users
often seem to be unable to answer one,
either. This thread exhibits both problems,
making it largely a waste of space and time.
Fenglin
Regular Advisor

Re: Can copy a file in a ftp session?

Hi Steven

There was a misunderstanding with the issue that I need to solve. That is what happened exactly.

I don't feel that there is a need to share the exact details of what happened.

Another thing is you can choose not reply to my queries if you feel so disturbed.

Regards
Feng Lin
Steven Schweda
Honored Contributor

Re: Can copy a file in a ftp session?

> I don't feel that there is a need to share
> the exact details of what happened.

That's fair, but my memory is not so good.
Perhaps you could include a note with your
future questions saying that you didn't
intend to provide sufficient information, and
that you won't answer any questions. This
might save us all considerable time and
frustration. Thanks.
Fenglin
Regular Advisor

Re: Can copy a file in a ftp session?

I meant only you Steven, not the rest.

You can choose not to reply my queries in the future.I am very fine with that.

I specify 'you' in my last email. I think you don't even understand simple english.