dir
Use dir to display information about the files and subdirectories under a directory.
Syntax
dir [ -a | -l ] [ remote-path ]
Views
SFTP client view
Predefined user roles
network-admin
mdc-admin
Parameters
-a: Displays detailed information about files and subdirectories under a directory in a list, including the files and subdirectories with names starting with dots (.).
-l: Displays detailed information about the files and subdirectories under a directory in a list, excluding the files and subdirectories with names starting with dots (.).
remote-path: Specifies the name of the directory to be queried. If you do not specify this argument, the command displays information about the files and subdirectories under the current working directory.
Usage guidelines
If you do not specify both of the –a and –l keywords, this command displays the names of the files and subdirectories under a directory.
This command has the same function as the ls command.
Examples
# Display detailed information about the files and subdirectories under the current directory, including the files and subdirectories with names starting with dots (.).
sftp> dir -a drwxrwxrwx 2 1 1 512 Dec 18 14:12 . drwxrwxrwx 2 1 1 512 Dec 18 14:12 .. -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 directory, excluding the files and subdirectories with names starting with dots (.).
sftp> dir -l -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