The mlsd command lists file names and properties on the remote host using the MLSD FTP server command, which returns data in a machine-readable format (see RFC 3659). It is therefore not aimed quite so much at human users (although it does provide these users with more information for DVS files than the dir command), but it is especially suited for use within procedures.
The scope of output can be modified using the OPTS FTP server command. For more information, see mlst command.
mlsd |
[<remote-directory> [<local-file>]] |
<remote-directory>
Name of a directory on the remote host. If this operand is omitted, a list of all the files in the current working directory of the remote host is returned.
<local-file>
Name of the local file to which the output from the command is to be written. If this operand is not specified, the output is sent to the terminal.
Example
The remote host is a BS2000 host.
Query the name of the working directory.
pwd 257 ":2OSG:$TSOS." is current directory.
List the files in the working directory on the screen. The FTP server function PORT is called implicitly.
mlsd 200 PORT command okay . . . type=file;perm=fr;size=2048;create=20161220175301;modify=20161220175301; SYSENT.TCP-IP-AP.nnn.FTPD type=file;perm=fr;size=2048;create=20161216132350;modify=20161216132350; SYSENT.TCP-IP-AP.nnn.START type=file;perm=fr;size=2048;create=20161216132414;modify=20161216132414; SYSENT.TCP-IP-AP.nnn.STARTF type=file;perm=fr;size=2048;create=20161216132352;modify=20161216132352; SYSENT.TCP-IP-AP.nnn.STARTT type=file;perm=fr;size=2048;create=20161216132405;modify=20161216132405; SYSENT.TCP-IP-AP.nnn.TELNETD . . .