LS

Read syntax diagramSkip visual syntax diagram LS name...(DISK

Purpose

Use the LS subcommand to list only the name(s) of a set of foreign files, file group, or directory.

Operands

name
The name of the directory or file group on the foreign host for which files should be listed. If name is omitted, all directory entries or files for the current working directory or file group are listed. For information about how to specify name, see the Usage Notes for this subcommand and File Name Formats.

To select which directory or file group is current, use the CD subcommand. For more information see CD or CWD.

.
Specifies that list information should be returned for the current working directory. For z/VM hosts, this operand is recognized in this manner only when SFS, HMC, or BFS directories are referenced. For other z/VM resources, responses are returned as if no operand had been specified.
..
Specifies that list information should be returned for the parent directory of the current working directory. For z/VM hosts, this operand is recognized in this manner only when SFS, HMC, or BFS directories are referenced. For other z/VM resources, responses are returned as if no operand had been specified.
DISK
Stores the results of the DIR subcommand in file FTP LSOUTPUT, on the current local working directory. DIR subcommand results are not displayed when this operand is used.

Usage Notes

  • The LS subcommand provides a list of directory and file names only. To obtain a list of directory and file entries that includes auxiliary information about those entries, use the DIR subcommand. For more information, see DIR.
  • For a given z/VM file system group, the response returned for an LS subcommand, regardless of whether VM-format or Unix-format lists are in use, is the same.
  • If the LS subcommand is issued for a BFS directory that contains other than regular BFS files, a z/VM foreign host may return an error response that indicates a BFS directory error has occurred.
  • For z/VM foreign hosts, pattern matching can be used to specify a subset of files about which information is returned. For more information see File Name Pattern Matching.
Note: z/VM hosts do not support pattern matching for BFS files and directories.

Examples

A sample response to an LS subcommand follows. In this example, pattern matching has been used to obtain a list of only those files for which the file name begins with a T:
  Command:
  ls t*
  >>>PORT 9,117,32,30,4,53
  200 Port request OK.
  >>>LIST
  125 List started OK
  TCPIP.DATA
  TCPMNT2.NETLOG
  TCPMNT2.SYNONYM
  TCPSLVL.EXEC
  TEST.EXEC
  TESTFTPB.EXEC
  TRACE2.TCPIP
  250 List completed successfully.
  Command:
A sample LS response for a z/VM virtual reader working directory is shown here:
  Command:
  ls
  >>>PORT 9,117,32,29,10,213
  200 Port request OK.
  >>>LIST
  125 List started OK
  0013.CIBULAPR.MAIL
  0154.FL3XSAMP.TXT
  0116.TCP-HELP.LIST3820
  0115.TCP-OVER.LIST3820
  0153.FL32SAMP.TXT
  0214.CIBULAMA.MAIL
  250 List completed successfully.
  Command: