sftp コマンドを入力するディレクトリがローカルの作業用ディレクトリになり、つまりこの操作のコピー元ディレクトリになります。
リモートシステムへの sftp 接続をオープンおよびクローズする方法を参照してください。
sftp> cd target-directory
sftp> ls -l target-directory
get コマンドではメタキャラクタを使用できます。
sftp> put filename
sftp> bye
この例では、ユーザーは host1 システムへの sftp 接続を開き、put コマンドを使用して、使用中のシステムから host1 システムの /tmp ディレクトリにファイルをコピーします。
$ cd /tmp $ sftp host1 Password: xxx sftp> cd /tmp sftp> put filef uploading filef to /tmp/filef filef 100% 325 0.3KB/s 00:00 sftp> ls filea filef files sftp> bye