Operating System - HP-UX
1819681 Members
3536 Online
109605 Solutions
New Discussion юеВ

How to move file to directory by using ftp command

 
Mousa55
Super Advisor

How to move file to directory by using ftp command

Hello
i can copy file from windows to unix by using ftp command but copy only to file i con't
copy to directory e.g /tmp
how to copy to directory by using ftp command

thanks and best regards
4 REPLIES 4
Steven Schweda
Honored Contributor

Re: How to move file to directory by using ftp command

Which system is the FTP client and which is
the FTP server?

If the Windows system is the client, which
FTP client program are you using?

Most command-line FTP clients have a "cd"
command. For example, from an HP-UX
"man ftp":

cd remote-directory
Set the working directory on the server host to remote-directory.

So, using a typical command-line FTP client,
you might say:

cd /tmp
put file

Without knowing more about your situation,
it's hard to say much more.
Mousa55
Super Advisor

Re: How to move file to directory by using ftp command

Hello
i am using this commands

c:\> cd
c:\> ftp
Give the username/password
Make it binary or ascii as per requirement.
Binary ( for data files)
Ascii ( for text files)
ftp> bin or ascii
ftp> put to copy the file from windows clients to hpux box.
ftp> bye

and i am need to move the file getsysinfo.sh to my server on /tmp

ftp>put getsysinfo.sh /tmp
in this case the file not moved because the /tmp it is directory

thanks
Yogeeraj_1
Honored Contributor

Re: How to move file to directory by using ftp command

hi

you cannot:
"ftp>put getsysinfo.sh /tmp"

you shoud:
ftp> cd /tmp
250 CWD command successful.
ftp> ascii
200 Type set to A.
ftp> put getsysinfo.sh


hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Steven Schweda
Honored Contributor

Re: How to move file to directory by using ftp command

And, if you don't like the "cd /tmp" method,
you could probably use:

put /tmp/

This will work with many (but not all) FTP
servers. The "cd" method should be more
widely accepted.

Some FTP servers may not allow you access to
the whole file system, especially when
anonymous FTP is used, and this could make
it impossible to get to "/tmp". For the
details, "man ftpd", and look for "anonymous"
and "chroot". This is probably _not_ your
problem.

> in this case the file not moved because
> the /tmp it is directory

As usual, the actual error message might have
been more helpful than your description of
it. I'll assume that it said:

553 /tmp: Is a directory.