sftp> lpwd
Local working directory: c:\
sftp> ls -alt
drwx------ 2 demo users 0 Feb 22 16:37 ..
drwx------ 2 demo users 0 Feb 22 16:37 .
-rw------- 1 demo users 405 Dec 17 2021 readme.txt
drwx------ 2 demo users 0 Oct 19 2020 pub
sftp> get readme.txt d:\sftp_readme.txt
Fetching /readme.txt to d:/sftp_readme.txt
/readme.txt 100% 405 0.6KB/s 00:00
sftp> put d:\test.txt sftptest.txt
Uploading d:/test.txt to /sftptest.txt
remote open("/sftptest.txt"): Permission denied
sftp>
- ls [-1afhlnrSt] [path]
- Display a remote directory listing of either path or the current
- directory if path is not specified. path may contain glob(3)
- characters and may match multiple files.
-
- The following flags are recognized and alter the behaviour of ls
- accordingly:
-
- -1 Produce single columnar output.
-
- -a List files beginning with a dot (‘.’).
-
- -f Do not sort the listing. The default sort order is lexi-
- cographical.
-
- -h When used with a long format option, use unit suffixes:
- Byte, Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte,
- and Exabyte in order to reduce the number of digits to
- four or fewer using powers of 2 for sizes (K=1024,
- M=1048576, etc.).
-
- -l Display additional details including permissions and own-
- ership information.
-
- -n Produce a long listing with user and group information
- presented numerically.
-
- -r Reverse the sort order of the listing.
-
- -S Sort the listing by file size.
sftp> help
Available commands:
bye Quit sftp
cd path Change remote directory to 'path'
chgrp grp path Change group of file 'path' to 'grp'
chmod mode path Change permissions of file 'path' to 'mode'
chown own path Change owner of file 'path' to 'own'
df [-hi] [path] Display statistics for current directory or
filesystem containing 'path'
exit Quit sftp
get [-afPpRr] remote [local] Download file
reget [-fPpRr] remote [local] Resume download file
reput [-fPpRr] [local] remote Resume upload file
help Display this help text
lcd path Change local directory to 'path'
lls [ls-options [path]] Display local directory listing
lmkdir path Create local directory
ln [-s] oldpath newpath Link remote file (-s for symlink)
lpwd Print local working directory
ls [-1afhlnrSt] [path] Display remote directory listing
lumask umask Set local umask to 'umask'
mkdir path Create remote directory
progress Toggle display of progress meter
put [-afPpRr] local [remote] Upload file
pwd Display remote working directory
quit Quit sftp
rename oldpath newpath Rename remote file
rm path Delete remote file
rmdir path Remove remote directory
symlink oldpath newpath Symlink remote file
version Show SFTP version
!command Execute 'command' in local shell
! Escape to local shell
? Synonym for help