Specifications
Version 2.0
151
ls
Summary
Lists a directory's contents or file information.
Usage
ls [-r] [-a[attrib]][-sfo][file]
Options
-r
Displays recursively (including subdirectories)
-a
Display only those files with the attributes which follow. If no attributes are
listed, then all files will be listed. If –a is not specified, then all non-system and
non-hidden files will be listed. The attributes (attrib) may be one or more of
the following:
1. a - Archive
2. s - System
3. h - Hidden
4. r - Read-only
5. d - Directory
-sfo
Display information as described in “Standard-Format Output” below.
file
Name of file/directory (wildcards are permitted)
Description
This command lists directory contents or file information. If no file name or directory
name is specified, then the current working directory is assumed. The contents of a
directory are listed if all of the following are true:
• If option -r is not specified
• If no wildcard characters are specified in the file parameter
• If file represents an existing directory
In all other cases, the command functions as follows:
• All files/directories that match the specified name are displayed.
• The -r flag determines whether a recursive search is performed.
• The option flag -a[attrib] tells the command to display only those files with
the attributes that are specified by [attrib]. If more than one attribute is










