home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man1 / ls.1 < prev    next >
Encoding:
Text File  |  1975-06-26  |  3.3 KB  |  138 lines

  1. .th LS I 3/20/74
  2. .sh NAME
  3. ls  \*-  list contents of directory
  4. .sh SYNOPSIS
  5. .bd ls
  6. [
  7. .bd \*-ltasdruifg
  8. ] name ...
  9. .sh DESCRIPTION
  10. For each directory argument,
  11. .it ls
  12. lists the contents of the directory;
  13. for each file argument,
  14. .it ls
  15. repeats its name and any other information requested.
  16. The output is sorted alphabetically by default.
  17. When no argument is given, the current directory is listed.
  18. When several arguments are given,
  19. the arguments are first sorted appropriately,
  20. but file arguments appear
  21. before directories and their contents.
  22. There are several options:
  23. .s3
  24. .lp +4 4
  25. \fB\*-l\fR    list in long format, giving mode, number of links, owner,
  26. size in bytes, and time of last modification
  27. for each file.
  28. (See below.)
  29. If the file is a special file the size field will instead contain
  30. the major and minor device numbers.
  31. .s3
  32. .lp +4 4
  33. \fB\*-t\fR    sort by time modified (latest first) instead of
  34. by name, as is normal
  35. .s3
  36. .lp +4 4
  37. \fB\*-a\fR    list all entries; usually those beginning with `\fB.\fR' are
  38. suppressed
  39. .s3
  40. .lp +4 4
  41. \fB\*-s\fR    give size in blocks for each entry
  42. .s3
  43. .lp +4 4
  44. \fB\*-d\fR    if argument is a directory, list only its name, not
  45. its contents (mostly used with
  46. .bd \*-l
  47. to get status
  48. on directory)
  49. .s3
  50. .lp +4 4
  51. \fB\*-r\fR    reverse the order of sort to get reverse alphabetic
  52. or oldest first as appropriate
  53. .s3
  54. .lp +4 4
  55. \fB\*-u\fR    use time of last access instead of last
  56. modification for sorting (\fB\*-t\fR) or printing
  57. (\fB\*-l\fR)
  58. .s3
  59. .lp +4 4
  60. \fB\*-i\fR    print i-number in first column
  61. of the report for each file listed
  62. .s3
  63. .lp +4 4
  64. \fB\*-f\fR    force each argument to be interpreted as a directory
  65. and list the name found in each slot.
  66. This option turns off
  67. .bd "\*-l, \*-t, \*-s,"
  68. and
  69. .bd \*-r,
  70. and
  71. turns on
  72. .bd \*-a;
  73. the order is the order in which entries
  74. appear in the directory.
  75. .s3
  76. .lp +4 4
  77. \fB\-g\fR    Give group ID instead of owner ID in long listing.
  78. .s3
  79. .i0
  80. The mode printed under the
  81. .bd \*-l
  82. option contains 11 characters
  83. which are interpreted
  84. as follows:
  85. the first character is
  86. .s3
  87. .lp +3 3
  88. \fBd\fR    if the entry is a directory;
  89. .lp +3 3
  90. \fBb\fR    if the entry is a block-type special file;
  91. .lp +3 3
  92. \fBc\fR    if the entry is a character-type special file;
  93. .lp +3 3
  94. \fB\*-\fR    if the entry is a plain file.
  95. .s3
  96. .i0
  97. The next 9 characters are interpreted
  98. as three sets of three bits each.
  99. The first set refers to owner permissions;
  100. the next to permissions to others in the same user-group;
  101. and the last to all others.
  102. Within each set the three characters indicate
  103. permission respectively to read, to write, or to
  104. execute the file as a program.
  105. For a directory, `execute' permission is interpreted
  106. to mean permission to search the directory
  107. for a specified file.
  108. The permissions are indicated as follows:
  109. .s3
  110. .lp +3 3
  111. \fBr\fR    if the file is readable
  112. .lp +3 3
  113. \fBw\fR    if the file is writable
  114. .lp +3 3
  115. \fBx\fR    if the file is executable
  116. .lp +3 3
  117. \fB\*-\fR    if the indicated permission is not granted
  118. .s3
  119. .i0
  120. The group-execute permission character is given
  121. as
  122. .bd s
  123. if the file has set-group-ID mode;
  124. likewise the user-execute permission character is given
  125. as
  126. .bd s
  127. if the file has set-user-ID mode.
  128. .s3
  129. The last character of the mode is normally blank but is printed as
  130. ``t'' if the 1000 bit of the mode is on.
  131. See
  132. .it "chmod (I)"
  133. for the current meaning of this mode.
  134. .sh FILES
  135. /etc/passwd to get user ID's for
  136. \fBls \*-l\fR.
  137. .sh BUGS
  138.