dir - UDM Command

Syntax

dir logical-name[=directory]

Description

The dir command provides a listing of the specified directory.

If no directory is specified, the current working directory (or qualifier) is used as the specified directory.

When the dir argument results in a "not found" condition, the dir command ends with _rc = 8 and _lastrc = 0 (see #dir "not found" condition, below).

Note

The dir command is valid only for the hfs file system.


IBM i

hfs supports the root and QOpenSys file systms under IFS.

z/OS

hfs supports the UNIX System Services file system.

Parameters

Parameter

Description

logical-name

Logical name of the transfer server to execute the dir command.

directory

Directory to list. This can be a relative path.

Examples

The following examples assume that the logical name remotesys is valid.


To list the contents of the current directory:


To list the contents of the /home/max/tmp directory:

Windows


To list the contents of the relative path tmp directory:

(The output will be the same as /home/max/tmp assuming that the current working directory is /home/max.)


dir "not found" condition

If the dir argument results in a "not found" condition, the dir command ends with _rc = 8 and _lastrc = 0.

This results in _rc = 8 and _lastrc = 0.


In the instance where a wild card is used, finding no files to return results in _rc = 0 and _lastrc = 0.

This results in _rc = 0 and _lastrc = 0 and no files listed.

Sample Output

The following is a sample dir command output:


Each file type is identified as:

  • "file": Files and symbolic links
  • "directory": Directories
  • "FIFO": FIFOs
  • "character": UNIX domain socket and other character devices
  • "block": Block oriented devices
  • "socket": Socket links
  • "external": External links (z/OS only)
  • "unknown": File type could not be determined