Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

dir - Show information on remote file(s)

&pagelevel(4)&pagelevel

The dir command returns information about files on the remote host. Details on remote files can also be obtained with the mdir, ls and mls commands.

dir

[<remote-file>] [<local-file>]]


<remote-file>

Name of a file on the remote host. If this operand is omitted, a list of all files in the current working directory of the remote host is returned.

<local-file>

Name of a 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.

If the connection to the partner was set up via an FTAC profile, the file information is only output relatively to the path name set in this profile.

Example

The remote host is a Unix system.

  1. The local and remote working directories are queried.

    lpwd
    Local directory is :5:$TCPTEST.MAN.
    pwd
    257 "/usr/tcptest/man/sam/nach.bs2000" is current directory.
    
  2. The files in the remote working directory are queried. The FTP server function PORT is called implicitly.

    dir
    200 PORT command successful.
    ...
    -rw-rw-r-- 1 tcptest 229   Sep 7 12:55 anton.1 
    -rw-rw-r-- 1 tcptest 229   Sep 7 12:55 anton.2 
    -rw-rw-r-- 1 tcptest 229   Sep 7 12:55 anton.3 
    -rwx------ 1 tcptest 10505 Sep 5 18:35 berta 
    -rw-rw-r-- 1 tcptest 229   Sep 7 12:55 berta.1 
    -rw-rw-r-- 1 tcptest 229   Sep 7 12:55 berta.2 
    -rwx------ 1 tcptest 10505 Sep 5 18:19 caesar 
    -rw-rw-r-- 1 tcptest 229   Sep 7 12:55 zwaton 
    ...
    461 bytes received in 2.54 seconds (1.58E-01 Kbytes/s)
    
  3. Information on the remote files

    anton.* is written to the local file anton.prot.

    dir anton.* anton.prot 
    200 PORT command okay. 
    ...