Operating System - HP-UX
1834187 Members
2939 Online
110064 Solutions
New Discussion

Re: In FTP add remote file to the local file

 
Chandrakumar Karunamoor
Occasional Advisor

In FTP add remote file to the local file

Hi,
I understand that the append command of ftp adds the local file to the remote file. But i need a command that adds the remote file to the local file.
For example,

>ftp star10
>user abc xyz
>(This command needs to append the
remote file to the local file)
>quit

Your help is highly appreciated.

Thank you,
Chandra
4 REPLIES 4
Jeff Schussele
Honored Contributor

Re: In FTP add remote file to the local file

Hi Chandra,

Don't believe there's a single command to do this. But you could do this several ways:

1) Move the local file to remote. Pull the remote file to local. Then append & pull it back
ftp>put local
ftp>get remote
ftp>append remote local
ftp>get local
ftp>bye

2) Pull the remote & cat it to local
ftp>get remote
ftp>bye
#cat remote >> local

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
monasingh_1
Trusted Contributor

Re: In FTP add remote file to the local file

well,not really the ftp command but you can do folowing:

ftp star10
>user abd pass
> runique
> get filename
> ! cat filename.1 >> filename
> ! rm filename.1
>bye

hope this helps..
S.K. Chan
Honored Contributor

Re: In FTP add remote file to the local file

There is no such command similar to the "append" operation. Jeff's suggestion would work just fine.
Chandrakumar Karunamoor
Occasional Advisor

Re: In FTP add remote file to the local file

Thank you for all your help.

Chandra