Jump to content

FTP: Difference between revisions

1,327 bytes added ,  1 year ago
Added Bash / Unix Shell Implementation
(Added Bash / Unix Shell Implementation)
Line 1,600:
return $fd
}
</lang>
 
=={{header|UNIX Shell}}==
Uses sftp which os available on all Linux distress by default. The commands are identical to ftp. This example uses the public free sftp server at test.rebex.net , the credentials are demo/password :
 
<lang bash>
Aamrun $ sftp demo@test.rebex.net
Password:
Connected to test.rebex.net.
sftp> ls
pub readme.txt
sftp> cd pub
sftp> ls
example
sftp> ls example
example/KeyGenerator.png example/KeyGeneratorSmall.png example/ResumableTransfer.png example/WinFormClient.png example/WinFormClientSmall.png example/imap-console-client.png example/mail-editor.png example/mail-send-winforms.png
example/mime-explorer.png example/pocketftp.png example/pocketftpSmall.png example/pop3-browser.png example/pop3-console-client.png example/readme.txt example/winceclient.png example/winceclientSmall.png
sftp> cd example
sftp> get KeyGenerator.png
Fetching /pub/example/KeyGenerator.png to KeyGenerator.png
/pub/example/KeyGenerator.png 100% 36KB 146.4KB/s 00:00
sftp> exit
Aamrun$
</lang>
 
503

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.