Usage

ls [ -flags ] [ -- ] [ fspec ... ]


The flags are optional. If specified, they must consist of a dash followed by one or more contiguous flag characters. The flags control what names are listed and in what format they are listed.

If no flags are specified, then -fdn is assumed: list all matching ordinary files and directories, and sort them by name.

Zero or more file specifications may be entered. Each file specification consists of an optional drive, optional path, and filename. Each filename may contain Bourne shell pattern-matching characters (better than DOS's, Win32's, and OS/2's wildcard characters, and supported on all of these platforms). The ls command lists all files in the specified directory whose names match the filename, according to the flags.

If a file specification is that of a directory, then ls appends /* to it and matches everything in that directory. If there are no file specifications, then ls assumes *: match everything in the current directory.