The directory from which you type the sftp command is the local working directory and thus the source directory for this operation.
sftp> cd target-directory
sftp> ls -l target-directory
Metacharacters may be used with the get command.
sftp> put filename
In this example, the user opens an sftp connection to the system host1, and uses the put command to copy a file from their system to the /tmp directory on system host1.
$ 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