Syntax
dir [ -a | -l ] [ remote-path ]
Views
SFTP client view
Predefined user roles
network-admin
Parameters
-a: Displays the names of the files and sub-directories under a specified directory.
-l: Displays detailed information about the files and sub-directories under a specified directory in the form
of a list.
remote-path: Specifies the name of the directory to be queried.
Usage guidelines
If the –a and –l keywords are not specified, the command displays the names of the files and
sub-directories under a specified directory.
If the remote-path argument is not specified, the command displays detailed information about the files
and sub-directories under the current working directory.
This command functions as the ls command.
Examples
# Display the names of the files and sub-directories under the current working directory.
sftp> dir –a
config.cfg
pubkey2
pubkey1
pub1
new1
new2
pub2
# Display detailed information about the files and sub-directories under the current working directory in
the form of a list.
sftp> dir –l
drwxrwxrwx 1 1 1 2048 Jan 1 00:00 diagfile
-rwxrwxrwx 1 1 1 548 Jan 2 00:17 dsakey
-rwxrwxrwx 1 1 1 716 Jan 2 00:17 hostkey
drwxrwxrwx 1 1 1 2048 Jan 1 11:47 logfile
drwxrwxrwx 1 1 1 2048 Jan 2 00:27 new1
drwxrwxrwx 1 1 1 2048 Jan 1 08:49 new2
-rw-rw-rw- 1 1 1 301 Jan 2 00:16 pubkey
drwxrwxrwx 1 1 1 2048 Jan 1 00:00 seclog
-rwxrwxrwx 1 1 1 572 Jan 2 00:17 serverkey
-rwxrwxrwx 1 1 1 4481 Sep 28 10:52 startup.cfg
242