Operating System - HP-UX
1828238 Members
2365 Online
109975 Solutions
New Discussion

sftp commands [ssh, et al]

 
Tim Hunt_4
Occasional Contributor

sftp commands [ssh, et al]

when using sftp (accroding to the man page) the put command:
"put [flags] local-path [remote-path]" specifies flags. What are those?

I am trying to implement/find the equivalent of APPEND in ftp.

Thanks
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: sftp commands [ssh, et al]

Here is how I do it

sftp connect

# where i'm putting a file
cd /tmp
# local directory to get the file from
lcd /tmp

put filename

bye

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
Chris Xu
Trusted Contributor

Re: sftp commands [ssh, et al]

There is no equivalent of ftp APPEND in sftp. However, a workaround can be transfering the file over via sftp or scp to a different filename on the remote system. And then append it to the target file using "cat file1 >> file2".

Chris
Michael Selvesteen_2
Trusted Contributor

Re: sftp commands [ssh, et al]

Hello,

Here flag is -p which preserves the file permissions.

For APPEND, following may help

cat |ssh RemoteMachine 'cat >> filename'

Hope this helps.

--
M