401
information of the file
exit Quit sftp
get remote-path [local-path] Download file
help Display this help text
ls [-a|-l][path] Display remote directory
-a List all filenames
-l List filename including the specific
information of the file
mkdir path Create remote directory
put local-path [remote-path] Upload file
pwd Display remote working directory
quit Quit sftp
rename oldpath newpath Rename remote file
remove path Delete remote file
rmdir path Delete remote empty directory
? Synonym for help
ls
Use ls to display information about the files and subdirectories under a directory.
Syntax
ls [ -a | -l ] [ remote-path ]
Views
SFTP client view
Predefined user roles
network-admin
Parameters
-a: Displays detailed information about the files and subdirectories under a directory in a list.
-l: Displays detailed information about the files and subdirectories under a directory in a list.
remote-path: Specifies the name of the directory to be queried. If this argument is not specified, the
command displays information about the files and subdirectories under the current working directory.
Usage guidelines
If the –a and –l keywords are not specified, the command displays the names of the files and
subdirectories under a directory.
This command functions as the dir command.
Examples
# Display detailed information about the files and subdirectories under the current working directory.
sftp> ls
-rwxrwxrwx 1 1 1 301 Dec 18 14:11 010.pub
-rwxrwxrwx 1 1 1 301 Dec 18 14:12 011.pub
-rwxrwxrwx 1 1 1 301 Dec 18 14:12 012.pub
# Display detailed information about the files and subdirectories under the current working directory in
a list.