Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (6561 KB)
ls(1B)Name | Synopsis | Description | Options | Operands | Usage | Files | Attributes | See Also | Notes Name
Synopsis/usr/ucb/ls [-aAcCdfFgilLqrRstu1] file... Description
For each filename that is a directory, ls lists the contents of the directory; for each filename that is a file, ls repeats its name and any other information requested. By default, the output is sorted alphabetically. When no argument is given, the current directory is listed. When several arguments are given, the arguments are first sorted appropriately, but file arguments are processed before directories and their contents. Permissions FieldThe mode printed under the -l option contains 10 characters interpreted as follows. If the first character is: The next 9 characters are interpreted as three sets of three bits each. The first set refers to owner permissions; the next refers to permissions to others in the same user-group; and the last refers to all others. Within each set, the three characters indicate permission respectively to read, to write, or to execute the file as a program. For a directory, “execute” permission is interpreted to mean permission to search the directory. The permissions are indicated as follows: The group-execute permission character is given as s if the file has the set-group-id bit set; likewise the owner-execute permission character is given as s if the file has the set-user-id bit set. The last character of the mode (normally x or `-') is true if the 1000 bit of the mode is on. See chmod(1) for the meaning of this mode. The indications of set-ID and 1000 bits of the mode are capitalized (S and T, respectively) if the corresponding execute permission is not set. A plus sign (+) appended to the list of permissions indicates that an ACL is associated with the file. When the sizes of the files in a directory are listed, a total count of blocks, including indirect blocks, is printed. Options
The following options are supported: Operands
The following operand is supported: UsageSee largefile(5) for the description of the behavior of ls when encountering files greater than or equal to 2 Gbyte ( 231 bytes). FilesAttributesSee attributes(5) for descriptions of the following attributes:
See AlsoNotes
The output device is assumed to be 80 columns wide. The option setting based on whether the output is a teletype is undesirable as `ls -s' is much different than `ls -s | lpr'. On the other hand, not doing this setting would make old shell scripts which used ls almost certain losers. Unprintable characters in file names can confuse the columnar output options. Name | Synopsis | Description | Options | Operands | Usage | Files | Attributes | See Also | Notes |
||||