1 '\" te 2 .\" Copyright 1989 AT&T 3 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved 4 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved 5 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. 6 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text 7 .\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical 8 .\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. 9 .\" This notice shall appear on any product containing this material. 10 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. 11 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the 12 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] 13 .TH LS 1 "Jun 3, 2009" 14 .SH NAME 15 ls \- list contents of directory 16 .SH SYNOPSIS 17 .LP 18 .nf 19 \fB/usr/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR] 20 [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR] 21 [--block-size size] [--color[=\fIwhen\fR]] [--file-type] 22 [--si] [--time-style \fIstyle\fR] [\fIfile\fR]... 23 .fi 24 25 .LP 26 .nf 27 \fB/usr/xpg4/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR] 28 [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR] 29 [--block-size size] [--color[=\fIwhen\fR]] [--file-type] 30 [--si] [--time-style \fIstyle\fR] [\fIfile\fR]... 31 .fi 32 33 .LP 34 .nf 35 \fB/usr/xpg6/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR] 36 [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR] 37 [--block-size size] [--color[=\fIwhen\fR]] [--file-type] 38 [--si] [--time-style \fIstyle\fR] [\fIfile\fR]... 39 .fi 40 41 .SH DESCRIPTION 42 .sp 43 .LP 44 For each \fIfile\fR that is a directory, \fBls\fR lists the contents of the 45 directory. For each \fIfile\fR that is an ordinary file, \fBls\fR repeats its 46 name and any other information requested. The output is sorted alphabetically 47 by default. When no argument is given, the current directory (\fB\&.\fR) is 48 listed. When several arguments are given, the arguments are first sorted 49 appropriately, but file arguments appear before directories and their contents. 50 .sp 51 .LP 52 There are three major listing formats. The default format for output directed 53 to a terminal is multi\(micolumn with entries sorted down the columns. The 54 \fB-1\fR option allows single column output and \fB-m\fR enables stream output 55 format. In order to determine output formats for the \fB-C\fR, \fB-x\fR, and 56 \fB-m\fR options, \fBls\fR uses an environment variable, \fBCOLUMNS\fR, to 57 determine the number of character positions available on one output line. If 58 this variable is not set, the \fBterminfo\fR(4) database is used to determine 59 the number of columns, based on the environment variable, \fBTERM\fR. If this 60 information cannot be obtained, 80 columns are assumed. If the \fB-w\fR option 61 is used, the argument overrides any other column width. 62 .sp 63 .LP 64 The mode printed when the \fB-e\fR, \fB-E\fR, \fB-g\fR, \fB-l\fR, \fB-n\fR, 65 \fB-o\fR, \fB-v\fR, \fB-V\fR, or \fB-@\fR option is in effect consists of 66 eleven characters. The first character can be one of the following: 67 .sp 68 .ne 2 69 .na 70 \fB\fBd\fR\fR 71 .ad 72 .sp .6 73 .RS 4n 74 The entry is a directory. 75 .RE 76 77 .sp 78 .ne 2 79 .na 80 \fB\fBD\fR\fR 81 .ad 82 .sp .6 83 .RS 4n 84 The entry is a door. 85 .RE 86 87 .sp 88 .ne 2 89 .na 90 \fB\fBl\fR\fR 91 .ad 92 .sp .6 93 .RS 4n 94 The entry is a symbolic link. 95 .RE 96 97 .sp 98 .ne 2 99 .na 100 \fB\fBb\fR\fR 101 .ad 102 .sp .6 103 .RS 4n 104 The entry is a block special file. 105 .RE 106 107 .sp 108 .ne 2 109 .na 110 \fB\fBc\fR\fR 111 .ad 112 .sp .6 113 .RS 4n 114 The entry is a character special file. 115 .RE 116 117 .sp 118 .ne 2 119 .na 120 \fB\fBp\fR\fR 121 .ad 122 .sp .6 123 .RS 4n 124 The entry is a \fBFIFO\fR (or "named pipe") special file. 125 .RE 126 127 .sp 128 .ne 2 129 .na 130 \fB\fBP\fR\fR 131 .ad 132 .sp .6 133 .RS 4n 134 The entry is an event port. 135 .RE 136 137 .sp 138 .ne 2 139 .na 140 \fB\fBs\fR\fR 141 .ad 142 .sp .6 143 .RS 4n 144 The entry is an \fBAF_UNIX\fR address family socket. 145 .RE 146 147 .sp 148 .ne 2 149 .na 150 \fB\fB\(mi\fR\fR 151 .ad 152 .sp .6 153 .RS 4n 154 The entry is an ordinary file. 155 .RE 156 157 .sp 158 .LP 159 The next 9 characters are interpreted as three sets of three bits each. The 160 first set refers to the owner's permissions; the next to permissions of others 161 in the user-group of the file; and the last to all others. Within each set, the 162 three characters indicate permission to read, to write, and to execute the file 163 as a program, respectively. For a directory, \fBexecute\fR permission is 164 interpreted to mean permission to search the directory for a specified file. 165 The character after permissions is an ACL or extended attributes indicator. 166 This character is an \fB@\fR if extended attributes are associated with the 167 file and the \fB-@\fR option is in effect. Otherwise, this character is a plus 168 sign (\fB+\fR) character if a non-trivial ACL is associated with the file or a 169 space character if not. 170 .sp 171 .LP 172 If \fB-/\fR and/or \fB-%\fR are in effect, then the extended system attributes 173 are printed when filesystem supports extended system attributes. The display 174 looks as follows: 175 .sp 176 .in +2 177 .nf 178 $ls -/ c file 179 -rw-r--r-- 1 root root 0 May 10 14:17 file 180 {AHRSadim-u} 181 182 $ls -/ v file 183 -rw-r--r-- 1 root root 0 May 10 14:17 file 184 {archive,hidden,readonly,system,appendonly\e 185 nodump,immutable, av_modified,\e 186 noav_quarantined,nounlink} 187 188 $ls -l -% all file 189 -rw-r--r-- 1 root root 0 May 10 14:17 file 190 timestamp: atime Jun 25 12:56:44 2007 191 timestamp: ctime May 10 14:20:23 2007 192 timestamp: mtime May 10 14:17:56 2007 193 timestamp: crtime May 10 14:17:56 2007 194 .fi 195 .in -2 196 .sp 197 198 .sp 199 .LP 200 See the option descriptions of the \fB-/\fR and \fB-%\fR option for details. 201 .sp 202 .LP 203 \fBls\fR \fB-l\fR (the long list) prints its output as follows for the POSIX 204 locale: 205 .sp 206 .in +2 207 .nf 208 -rwxrwxrwx+ 1 smith dev 10876 May 16 9:42 part2 209 .fi 210 .in -2 211 .sp 212 213 .sp 214 .LP 215 Reading from right to left, you see that the current directory holds one file, 216 named \fBpart2\fR. Next, the last time that file's contents were modified was 217 \fB9:42 A.M.\fR on \fBMay 16\fR. The file contains 10,876 characters, or bytes. 218 The owner of the file, or the user, belongs to the group \fBdev\fR (perhaps 219 indicating \fBdevelopment\fR), and his or her login name is \fBsmith\fR. The 220 number, in this case \fB1\fR, indicates the number of links to file \fBpart2\fR 221 (see \fBcp\fR(1)). The plus sign indicates that there is an \fBACL\fR 222 associated with the file. If the \fB-@\fR option has been specified, the 223 presence of extended attributes supersede the presence of an \fBACL\fR and the 224 plus sign is replaced with an 'at' sign (\fB@\fR). Finally, the dash and 225 letters tell you that user, group, and others have permissions to read, write, 226 and execute \fBpart2\fR. 227 .sp 228 .LP 229 The execute (\fBx\fR) symbol occupies the third position of the three-character 230 sequence. A \fB\(mi\fR in the third position would have indicated a denial of 231 execution permissions. 232 .sp 233 .LP 234 The permissions are indicated as follows: 235 .sp 236 .ne 2 237 .na 238 \fB\fBr\fR\fR 239 .ad 240 .sp .6 241 .RS 4n 242 The file is readable. 243 .RE 244 245 .sp 246 .ne 2 247 .na 248 \fB\fBw\fR\fR 249 .ad 250 .sp .6 251 .RS 4n 252 The file is writable. 253 .RE 254 255 .sp 256 .ne 2 257 .na 258 \fB\fBx\fR\fR 259 .ad 260 .sp .6 261 .RS 4n 262 The file is executable. 263 .RE 264 265 .sp 266 .ne 2 267 .na 268 \fB\fB\(mi\fR\fR 269 .ad 270 .sp .6 271 .RS 4n 272 The indicated permission is \fInot\fR granted. 273 .RE 274 275 .sp 276 .ne 2 277 .na 278 \fB\fBs\fR\fR 279 .ad 280 .sp .6 281 .RS 4n 282 The \fBs\fRet-user-ID or \fBs\fRet-group-ID bit is on, and the corresponding 283 user or group execution bit is also on. 284 .RE 285 286 .sp 287 .ne 2 288 .na 289 \fB\fBS\fR\fR 290 .ad 291 .sp .6 292 .RS 4n 293 Undefined bit-state (the set-user-ID or set-group-id bit is on and the user or 294 group execution bit is off). For group permissions, this applies only to 295 non-regular files. 296 .RE 297 298 .sp 299 .ne 2 300 .na 301 \fB\fBt\fR\fR 302 .ad 303 .sp .6 304 .RS 4n 305 The 1000 (octal) bit, or sticky bit, is on (see \fBchmod\fR(1)), and execution 306 is on. 307 .RE 308 309 .sp 310 .ne 2 311 .na 312 \fB\fBT\fR\fR 313 .ad 314 .sp .6 315 .RS 4n 316 The 1000 bit is turned on, and execution is off (undefined bit-state). 317 .RE 318 319 .SS "/usr/bin/ls" 320 .sp 321 .ne 2 322 .na 323 \fB\fBl\fR\fR 324 .ad 325 .sp .6 326 .RS 4n 327 Mandatory locking occurs during access (on a regular file, the set-group-ID bit 328 is on and the group execution bit is off). 329 .RE 330 331 .SS "/usr/xpg4/bin/ls and /usr/xpg6/bin/ls" 332 .sp 333 .ne 2 334 .na 335 \fB\fBL\fR\fR 336 .ad 337 .sp .6 338 .RS 4n 339 Mandatory locking occurs during access (on a regular file, the set-group-ID bit 340 is on and the group execution bit is off). 341 .RE 342 343 .sp 344 .LP 345 For user and group permissions, the third position is sometimes occupied by a 346 character other than \fBx\fR or \fB-\fR. \fBs\fR or \fBS\fR also can occupy 347 this position, referring to the state of the set-ID bit, whether it be the 348 user's or the group's. The ability to assume the same ID as the user during 349 execution is, for example, used during login when you begin as root but need to 350 assume the identity of the user you login as. 351 .sp 352 .LP 353 In the case of the sequence of group permissions, \fBl\fR can occupy the third 354 position. \fBl\fR refers to mandatory file and record locking. This permission 355 describes a file's ability to allow other files to lock its reading or writing 356 permissions during access. 357 .sp 358 .LP 359 For others permissions, the third position can be occupied by \fBt\fR or 360 \fBT\fR. These refer to the state of the sticky bit and execution permissions. 361 .SS "Color Output" 362 .sp 363 .LP 364 If color output is enabled, the environment variable LS_COLORS is checked. If 365 it exists, it's contents are used to control the colors used to display 366 filenames. If it is not set, a default list of colors is used. The format of 367 LS_COLORS is a colon separated list of attribute specifications. Each attribute 368 specification is of the format 369 .sp 370 .in +2 371 .nf 372 \fIfilespec\fR=\fIattr\fR[;\fIattr\fR..] 373 .fi 374 .in -2 375 .sp 376 377 .sp 378 .LP 379 \fIfilespec\fR is either of the form \fI*.SUFFIX\fR, for example, \fB*.jar\fR 380 or \fB*.Z\fR, or one of the following file types: 381 .sp 382 .ne 2 383 .na 384 \fB\fBno\fR\fR 385 .ad 386 .sp .6 387 .RS 4n 388 Normal file 389 .RE 390 391 .sp 392 .ne 2 393 .na 394 \fB\fBfi\fR\fR 395 .ad 396 .sp .6 397 .RS 4n 398 Regular file 399 .RE 400 401 .sp 402 .ne 2 403 .na 404 \fB\fBdi\fR\fR 405 .ad 406 .sp .6 407 .RS 4n 408 Directory 409 .RE 410 411 .sp 412 .ne 2 413 .na 414 \fB\fBln\fR\fR 415 .ad 416 .sp .6 417 .RS 4n 418 Symbolic link 419 .RE 420 421 .sp 422 .ne 2 423 .na 424 \fB\fBpi\fR\fR 425 .ad 426 .sp .6 427 .RS 4n 428 FIFO or named pipe 429 .RE 430 431 .sp 432 .ne 2 433 .na 434 \fB\fBso\fR\fR 435 .ad 436 .sp .6 437 .RS 4n 438 Socket 439 .RE 440 441 .sp 442 .ne 2 443 .na 444 \fB\fBdo\fR\fR 445 .ad 446 .sp .6 447 .RS 4n 448 Door file 449 .RE 450 451 .sp 452 .ne 2 453 .na 454 \fB\fBbd\fR\fR 455 .ad 456 .sp .6 457 .RS 4n 458 Block device 459 .RE 460 461 .sp 462 .ne 2 463 .na 464 \fB\fBcd\fR\fR 465 .ad 466 .sp .6 467 .RS 4n 468 Character device 469 .RE 470 471 .sp 472 .ne 2 473 .na 474 \fB\fBex\fR\fR 475 .ad 476 .sp .6 477 .RS 4n 478 Execute bit (either \fBuser\fR, \fBgroup\fR, or \fBother\fR) set 479 .RE 480 481 .sp 482 .ne 2 483 .na 484 \fB\fBpo\fR\fR 485 .ad 486 .sp .6 487 .RS 4n 488 Event port 489 .RE 490 491 .sp 492 .ne 2 493 .na 494 \fB\fBst\fR\fR 495 .ad 496 .sp .6 497 .RS 4n 498 Sticky bit set 499 .RE 500 501 .sp 502 .ne 2 503 .na 504 \fB\fBor\fR\fR 505 .ad 506 .sp .6 507 .RS 4n 508 Orphaned symlink 509 .RE 510 511 .sp 512 .ne 2 513 .na 514 \fB\fBsg\fR\fR 515 .ad 516 .sp .6 517 .RS 4n 518 \fBsetgid\fR binary 519 .RE 520 521 .sp 522 .ne 2 523 .na 524 \fB\fBsu\fR\fR 525 .ad 526 .sp .6 527 .RS 4n 528 \fBsetuid\fR binary 529 .RE 530 531 .sp 532 .ne 2 533 .na 534 \fB\fBow\fR\fR 535 .ad 536 .sp .6 537 .RS 4n 538 \fBworld\fR writable 539 .RE 540 541 .sp 542 .ne 2 543 .na 544 \fB\fBtw\fR\fR 545 .ad 546 .sp .6 547 .RS 4n 548 Sticky bit and \fBworld\fR writable 549 .RE 550 551 .sp 552 .LP 553 \fIattr\fR is a semicolon delimited list of color and display attributes which 554 are combined to determine the final output color. Any combination of \fIattr\fR 555 values can be specified. Possible \fIattr\fR values are: 556 .sp 557 .ne 2 558 .na 559 \fB\fB00\fR\fR 560 .ad 561 .sp .6 562 .RS 4n 563 All attributes off (default terminal color) 564 .RE 565 566 .sp 567 .ne 2 568 .na 569 \fB\fB01\fR\fR 570 .ad 571 .sp .6 572 .RS 4n 573 Display text in bold 574 .RE 575 576 .sp 577 .ne 2 578 .na 579 \fB\fB04\fR\fR 580 .ad 581 .sp .6 582 .RS 4n 583 Display text with an underscore 584 .RE 585 586 .sp 587 .ne 2 588 .na 589 \fB\fB05\fR\fR 590 .ad 591 .sp .6 592 .RS 4n 593 Display text in bold 594 .RE 595 596 .sp 597 .ne 2 598 .na 599 \fB\fB07\fR\fR 600 .ad 601 .sp .6 602 .RS 4n 603 Display text with foreground and background colors reversed 604 .RE 605 606 .sp 607 .ne 2 608 .na 609 \fB\fB08\fR\fR 610 .ad 611 .sp .6 612 .RS 4n 613 Display using concealed text. 614 .RE 615 616 .sp 617 .LP 618 One of the following values can be chosen. If multiple values are specified, 619 the last specified value is used. 620 .sp 621 .ne 2 622 .na 623 \fB\fB30\fR\fR 624 .ad 625 .sp .6 626 .RS 4n 627 Set foreground to \fBblack\fR. 628 .RE 629 630 .sp 631 .ne 2 632 .na 633 \fB\fB31\fR\fR 634 .ad 635 .sp .6 636 .RS 4n 637 Set foreground to \fBred\fR. 638 .RE 639 640 .sp 641 .ne 2 642 .na 643 \fB\fB32\fR\fR 644 .ad 645 .sp .6 646 .RS 4n 647 Set foreground to \fBgreen\fR. 648 .RE 649 650 .sp 651 .ne 2 652 .na 653 \fB\fB33\fR\fR 654 .ad 655 .sp .6 656 .RS 4n 657 Set foreground to \fByellow\fR. 658 .RE 659 660 .sp 661 .ne 2 662 .na 663 \fB\fB34\fR\fR 664 .ad 665 .sp .6 666 .RS 4n 667 Set foreground to \fBblue\fR. 668 .RE 669 670 .sp 671 .ne 2 672 .na 673 \fB\fB35\fR\fR 674 .ad 675 .sp .6 676 .RS 4n 677 Set foreground to \fBmagenta\fR (\fBpurple\fR). 678 .sp 679 Set foreground to \fB\fR. 680 .RE 681 682 .sp 683 .ne 2 684 .na 685 \fB\fB36\fR\fR 686 .ad 687 .sp .6 688 .RS 4n 689 Set foreground to \fBcyan\fR. 690 .RE 691 692 .sp 693 .ne 2 694 .na 695 \fB\fB37\fR\fR 696 .ad 697 .sp .6 698 .RS 4n 699 Set foreground to \fBwhite\fR. 700 .RE 701 702 .sp 703 .ne 2 704 .na 705 \fB\fB39\fR\fR 706 .ad 707 .sp .6 708 .RS 4n 709 Set foreground to default terminal color. 710 .RE 711 712 .sp 713 .LP 714 One of the following can be specified. If multiple values are specified, the 715 last value specified is used. 716 .sp 717 .ne 2 718 .na 719 \fB\fB40\fR\fR 720 .ad 721 .sp .6 722 .RS 4n 723 Set foreground to \fBblack\fR. 724 .RE 725 726 .sp 727 .ne 2 728 .na 729 \fB\fB41\fR\fR 730 .ad 731 .sp .6 732 .RS 4n 733 Set foreground to \fBred\fR. 734 .RE 735 736 .sp 737 .ne 2 738 .na 739 \fB\fB42\fR\fR 740 .ad 741 .sp .6 742 .RS 4n 743 Set foreground to \fBgreen\fR. 744 .RE 745 746 .sp 747 .ne 2 748 .na 749 \fB\fB43\fR\fR 750 .ad 751 .sp .6 752 .RS 4n 753 Set foreground to \fByellow\fR. 754 .RE 755 756 .sp 757 .ne 2 758 .na 759 \fB\fB44\fR\fR 760 .ad 761 .sp .6 762 .RS 4n 763 Set foreground to \fBblue\fR. 764 .RE 765 766 .sp 767 .ne 2 768 .na 769 \fB\fB45\fR\fR 770 .ad 771 .sp .6 772 .RS 4n 773 Set foreground to \fBmagenta\fR (\fBpurple\fR). 774 .RE 775 776 .sp 777 .ne 2 778 .na 779 \fB\fB46\fR\fR 780 .ad 781 .sp .6 782 .RS 4n 783 Set foreground to \fBcyan\fR. 784 .RE 785 786 .sp 787 .ne 2 788 .na 789 \fB\fB47\fR\fR 790 .ad 791 .sp .6 792 .RS 4n 793 Set foreground to \fBwhite\fR. 794 .RE 795 796 .sp 797 .ne 2 798 .na 799 \fB\fB49\fR\fR 800 .ad 801 .sp .6 802 .RS 4n 803 Set foreground to default terminal color. 804 .RE 805 806 .sp 807 .LP 808 On some terminals, setting the bold attribute causes the foreground colors to 809 be high-intensity, that is, brighter. In such cases the low-intensity yellow is 810 often displayed as a brown or orange color. 811 .sp 812 .LP 813 At least one attribute must be listed for a file specification. 814 .sp 815 .LP 816 The appropriate color codes are chosen by selecting the most specific match, 817 starting with the file suffixes and proceeding with the file types until a 818 match is found. The \fBno\fR (normal file) type matches any file. 819 .SH OPTIONS 820 .sp 821 .LP 822 The following options are supported: 823 .SS "/usr/bin/ls, /usr/xpg4/bin/ls, and /usr/xpg6/bin/ls" 824 .sp 825 .LP 826 The following options are supported for all three versions: 827 .sp 828 .ne 2 829 .na 830 \fB\fB-a\fR\fR 831 .ad 832 .br 833 .na 834 \fB\fB--all\fR\fR 835 .ad 836 .sp .6 837 .RS 4n 838 Lists all entries, including those that begin with a dot (\fB\&.\fR), which are 839 normally not listed. 840 .RE 841 842 .sp 843 .ne 2 844 .na 845 \fB\fB-A\fR\fR 846 .ad 847 .br 848 .na 849 \fB\fB--almost-all\fR\fR 850 .ad 851 .sp .6 852 .RS 4n 853 Lists all entries, including those that begin with a dot (\fB\&.\fR), with the 854 exception of the working directory (\fB\&.\fR) and the parent directory 855 (\fB\&..\fR). 856 .RE 857 858 .sp 859 .ne 2 860 .na 861 \fB\fB-b\fR\fR 862 .ad 863 .br 864 .na 865 \fB\fB--escape\fR\fR 866 .ad 867 .sp .6 868 .RS 4n 869 Forces printing of non-printable characters to be in the octal 870 \fB\e\fR\fIddd\fR notation. 871 .RE 872 873 .sp 874 .ne 2 875 .na 876 \fB\fB-B\fR\fR 877 .ad 878 .br 879 .na 880 \fB\fB--ignore-backups\fR\fR 881 .ad 882 .sp .6 883 .RS 4n 884 Do not display any files ending with a tilde (\fB~\fR). 885 .RE 886 887 .sp 888 .ne 2 889 .na 890 \fB\fB-c\fR\fR 891 .ad 892 .sp .6 893 .RS 4n 894 Uses time of last modification of the i-node (file created, mode changed, and 895 so forth) for sorting (\fB-t\fR) or printing (\fB-l\fR or \fB-n\fR). 896 .RE 897 898 .sp 899 .ne 2 900 .na 901 \fB\fB-C\fR\fR 902 .ad 903 .sp .6 904 .RS 4n 905 Multi-column output with entries sorted down the columns. This is the default 906 output format. 907 .RE 908 909 .sp 910 .ne 2 911 .na 912 \fB\fB-d\fR\fR 913 .ad 914 .sp .6 915 .RS 4n 916 If an argument is a directory, lists only its name (not its contents). Often 917 used with \fB-l\fR to get the status of a directory. 918 .RE 919 920 .sp 921 .ne 2 922 .na 923 \fB\fB-e\fR\fR 924 .ad 925 .sp .6 926 .RS 4n 927 The same as \fB-l\fR, except displays time to the second, and with one format 928 for all files regardless of age: \fImmm dd hh:mm:ss yyyy\fR. 929 .RE 930 931 .sp 932 .ne 2 933 .na 934 \fB\fB-E\fR\fR 935 .ad 936 .sp .6 937 .RS 4n 938 The same as \fB-l\fR, except displays time to the nanosecond and with one 939 format for all files regardless of age: \fIyyyy-mm-dd hh:mm:ss.nnnnnnnnn\fR 940 (ISO 8601:2000 format). 941 .sp 942 In addition, this option displays the offset from UTC in ISO 8601:2000 standard 943 format (+\fIhhmm\fR or -\fIhhmm\fR) or no characters if the offset is 944 indeterminable. The offset reflects the appropriate standard or alternate 945 offset in force at the file's displayed date and time, under the current 946 timezone. 947 .RE 948 949 .sp 950 .ne 2 951 .na 952 \fB\fB-f\fR\fR 953 .ad 954 .sp .6 955 .RS 4n 956 Forces each argument to be interpreted as a directory and list the name found 957 in each slot. This option turns off \fB-l\fR, \fB-t\fR, \fB-s\fR, \fB-S\fR, and 958 \fB-r\fR, and turns on \fB-a\fR. The order is the order in which entries appear 959 in the directory. 960 .RE 961 962 .sp 963 .ne 2 964 .na 965 \fB\fB-F\fR\fR 966 .ad 967 .br 968 .na 969 \fB\fB--classify\fR\fR 970 .ad 971 .sp .6 972 .RS 4n 973 Append a symbol after certain types of files to indicate the file type. The 974 following symbols are used: 975 .sp 976 .ne 2 977 .na 978 \fB\fB/\fR\fR 979 .ad 980 .sp .6 981 .RS 4n 982 Directory 983 .RE 984 985 .sp 986 .ne 2 987 .na 988 \fB\fB>\fR\fR 989 .ad 990 .sp .6 991 .RS 4n 992 Door file 993 .RE 994 995 .sp 996 .ne 2 997 .na 998 \fB\fB|\fR\fR 999 .ad 1000 .sp .6 1001 .RS 4n 1002 Named pipe (\fBFIFO\fR) 1003 .RE 1004 1005 .sp 1006 .ne 2 1007 .na 1008 \fB\fB@\fR\fR 1009 .ad 1010 .sp .6 1011 .RS 4n 1012 Symbolic link 1013 .RE 1014 1015 .sp 1016 .ne 2 1017 .na 1018 \fB\fB=\fR\fR 1019 .ad 1020 .sp .6 1021 .RS 4n 1022 Socket 1023 .RE 1024 1025 .sp 1026 .ne 2 1027 .na 1028 \fB\fB*\fR\fR 1029 .ad 1030 .sp .6 1031 .RS 4n 1032 Executable 1033 .RE 1034 1035 .RE 1036 1037 .sp 1038 .ne 2 1039 .na 1040 \fB\fB-g\fR\fR 1041 .ad 1042 .sp .6 1043 .RS 4n 1044 The same as \fB-l\fR, except that the owner is not printed. 1045 .RE 1046 1047 .sp 1048 .ne 2 1049 .na 1050 \fB\fB-h\fR\fR 1051 .ad 1052 .br 1053 .na 1054 \fB\fB--human-readable\fR\fR 1055 .ad 1056 .sp .6 1057 .RS 4n 1058 All sizes are scaled to a human readable format, for example, \fB14K\fR, 1059 \fB234M\fR, \fB2.7G\fR, or \fB3.0T\fR. Scaling is done by repetitively dividing 1060 by \fB1024\fR. The last --si or -h option determines the divisor used. 1061 .RE 1062 1063 .sp 1064 .ne 2 1065 .na 1066 \fB\fB-H\fR\fR 1067 .ad 1068 .br 1069 .na 1070 \fB\fB--dereference-command-line\fR\fR 1071 .ad 1072 .sp .6 1073 .RS 4n 1074 If an argument is a symbolic link that references a directory, this option 1075 evaluates the file information and file type of the directory that the link 1076 references, rather than those of the link itself. However, the name of the link 1077 is displayed, rather than the referenced directory. 1078 .RE 1079 1080 .sp 1081 .ne 2 1082 .na 1083 \fB\fB-i\fR\fR 1084 .ad 1085 .br 1086 .na 1087 \fB\fB--inode\fR\fR 1088 .ad 1089 .sp .6 1090 .RS 4n 1091 For each file, prints the i-node number in the first column of the report. 1092 .RE 1093 1094 .sp 1095 .ne 2 1096 .na 1097 \fB\fB-k\fR\fR 1098 .ad 1099 .sp .6 1100 .RS 4n 1101 All sizes are printed in kbytes. Equivalent to --block-size=1024. 1102 .RE 1103 1104 .sp 1105 .ne 2 1106 .na 1107 \fB\fB-l\fR\fR 1108 .ad 1109 .sp .6 1110 .RS 4n 1111 Lists in long format, giving mode, \fBACL\fR indication, number of links, 1112 owner, group, size in bytes, and time of last modification for each file (see 1113 above). If the file is a special file, the size field instead contains the 1114 major and minor device numbers. If the time of last modification is greater 1115 than six months ago, it is shown in the format `month date year' for the POSIX 1116 locale. When the \fBLC_TIME\fR locale category is not set to the POSIX locale, 1117 a different format of the time field can be used. Files modified within six 1118 months show `month date time'. If the file is a symbolic link, the filename is 1119 printed followed by "\fB\(->\fR" and the path name of the referenced file. 1120 .RE 1121 1122 .sp 1123 .ne 2 1124 .na 1125 \fB\fB-L\fR\fR 1126 .ad 1127 .br 1128 .na 1129 \fB\fB--dereference\fR\fR 1130 .ad 1131 .sp .6 1132 .RS 4n 1133 If an argument is a symbolic link, this option evaluates the file information 1134 and file type of the file or directory that the link references, rather than 1135 those of the link itself. However, the name of the link is displayed, rather 1136 than the referenced file or directory. 1137 .RE 1138 1139 .sp 1140 .ne 2 1141 .na 1142 \fB\fB-m\fR\fR 1143 .ad 1144 .sp .6 1145 .RS 4n 1146 Streams output format. Files are listed across the page, separated by commas. 1147 .RE 1148 1149 .sp 1150 .ne 2 1151 .na 1152 \fB\fB-n\fR\fR 1153 .ad 1154 .br 1155 .na 1156 \fB\fB--numeric-uid-gid\fR\fR 1157 .ad 1158 .sp .6 1159 .RS 4n 1160 The same as \fB-l\fR, except that the owner's \fBUID\fR and group's \fBGID\fR 1161 numbers are printed, rather than the associated character strings. 1162 .RE 1163 1164 .sp 1165 .ne 2 1166 .na 1167 \fB\fB-o\fR\fR 1168 .ad 1169 .br 1170 .na 1171 \fB\fB--no-group\fR\fR 1172 .ad 1173 .sp .6 1174 .RS 4n 1175 The same as \fB-l\fR, except that the group is not printed. 1176 .RE 1177 1178 .sp 1179 .ne 2 1180 .na 1181 \fB\fB-p\fR\fR 1182 .ad 1183 .sp .6 1184 .RS 4n 1185 Puts a slash (\fB/\fR) after each filename if the file is a directory. 1186 .RE 1187 1188 .sp 1189 .ne 2 1190 .na 1191 \fB\fB-q\fR\fR 1192 .ad 1193 .br 1194 .na 1195 \fB\fB--hide-control-chars\fR\fR 1196 .ad 1197 .sp .6 1198 .RS 4n 1199 Forces printing of non-printable characters in file names as the character 1200 question mark (\fB?\fR). 1201 .RE 1202 1203 .sp 1204 .ne 2 1205 .na 1206 \fB\fB-r\fR\fR 1207 .ad 1208 .br 1209 .na 1210 \fB\fB--reverse\fR\fR 1211 .ad 1212 .sp .6 1213 .RS 4n 1214 Reverses the order of sort to get reverse alphabetic, oldest first, or smallest 1215 file size first as appropriate. 1216 .RE 1217 1218 .sp 1219 .ne 2 1220 .na 1221 \fB\fB-R\fR\fR 1222 .ad 1223 .br 1224 .na 1225 \fB\fB--recursive\fR\fR 1226 .ad 1227 .sp .6 1228 .RS 4n 1229 Recursively lists subdirectories encountered. 1230 .RE 1231 1232 .sp 1233 .ne 2 1234 .na 1235 \fB\fB-s\fR\fR 1236 .ad 1237 .br 1238 .na 1239 \fB\fB--size\fR\fR 1240 .ad 1241 .sp .6 1242 .RS 4n 1243 Indicate the total number of file system blocks consumed by each file 1244 displayed. 1245 .RE 1246 1247 .sp 1248 .ne 2 1249 .na 1250 \fB\fB-S\fR\fR 1251 .ad 1252 .sp .6 1253 .RS 4n 1254 Sort by file size (in decreasing order) and for files with the same size by 1255 file name (in increasing alphabetic order) instead of just by name. 1256 .RE 1257 1258 .sp 1259 .ne 2 1260 .na 1261 \fB\fB-t\fR\fR 1262 .ad 1263 .sp .6 1264 .RS 4n 1265 Sorts by time stamp (latest first) instead of by name. The default is the last 1266 modification time. See \fB-c\fR, \fB-u\fR and \fB-%\fR. 1267 .RE 1268 1269 .sp 1270 .ne 2 1271 .na 1272 \fB\fB-u\fR\fR 1273 .ad 1274 .sp .6 1275 .RS 4n 1276 Uses time of last access instead of last modification for sorting (with the 1277 \fB-t\fR option) or printing (with the \fB-l\fR option). 1278 .RE 1279 1280 .sp 1281 .ne 2 1282 .na 1283 \fB\fB-U\fR\fR 1284 .ad 1285 .sp .6 1286 .RS 4n 1287 Output is unsorted. 1288 .RE 1289 1290 .sp 1291 .ne 2 1292 .na 1293 \fB\fB-v\fR\fR 1294 .ad 1295 .sp .6 1296 .RS 4n 1297 The same as \fB-l\fR, except that verbose ACL information is displayed as well 1298 as the \fB-l\fR output. ACL information is displayed even if the file or 1299 directory doesn't have an ACL. 1300 .RE 1301 1302 .sp 1303 .ne 2 1304 .na 1305 \fB\fB-V\fR\fR 1306 .ad 1307 .sp .6 1308 .RS 4n 1309 The same as \fB-l\fR, except that compact ACL information is displayed after 1310 the \fB-l\fR output. 1311 .sp 1312 The \fB-V\fR option is only applicable to file systems that support NFSv4 ACLs, 1313 such as the Solaris ZFS file system. 1314 .sp 1315 The format of the displayed ACL is as follows: 1316 .sp 1317 .in +2 1318 .nf 1319 \fIentry_type\fR : \fIpermissions\fR : \fIinheritance_flags\fR : \fIaccess_type\fR 1320 .fi 1321 .in -2 1322 .sp 1323 1324 \fIentry_type\fR is displayed as one of the following: 1325 .sp 1326 .ne 2 1327 .na 1328 \fBuser:\fIusername\fR\fR 1329 .ad 1330 .sp .6 1331 .RS 4n 1332 Additional user access for \fIusername\fR. 1333 .RE 1334 1335 .sp 1336 .ne 2 1337 .na 1338 \fBgroup:\fIgroupname\fR\fR 1339 .ad 1340 .sp .6 1341 .RS 4n 1342 Additional group access for group \fIgroupname\fR. 1343 .RE 1344 1345 .sp 1346 .ne 2 1347 .na 1348 \fBowner@\fR 1349 .ad 1350 .sp .6 1351 .RS 4n 1352 File owner. 1353 .RE 1354 1355 .sp 1356 .ne 2 1357 .na 1358 \fBgroup@\fR 1359 .ad 1360 .sp .6 1361 .RS 4n 1362 File group owner. 1363 .RE 1364 1365 .sp 1366 .ne 2 1367 .na 1368 \fBeveryone@\fR 1369 .ad 1370 .sp .6 1371 .RS 4n 1372 Everyone access, including file owner and file group owner. This is not 1373 equivalent to the POSIX other class. 1374 .RE 1375 1376 The following permissions, supported by the NFSv4 ACL model, are displayed by 1377 using the \fB-v\fR or \fB-V\fR options: 1378 .sp 1379 .ne 2 1380 .na 1381 \fBread_data (\fBr\fR)\fR 1382 .ad 1383 .sp .6 1384 .RS 4n 1385 Permission to read the data of a file. 1386 .RE 1387 1388 .sp 1389 .ne 2 1390 .na 1391 \fBlist_directory (\fBr\fR)\fR 1392 .ad 1393 .sp .6 1394 .RS 4n 1395 Permission to list the contents of a directory. 1396 .RE 1397 1398 .sp 1399 .ne 2 1400 .na 1401 \fBwrite_data (\fBw\fR)\fR 1402 .ad 1403 .sp .6 1404 .RS 4n 1405 Permission to modify a file's data. anywhere in the file's offset range. 1406 .RE 1407 1408 .sp 1409 .ne 2 1410 .na 1411 \fBadd_file (\fBw\fR)\fR 1412 .ad 1413 .sp .6 1414 .RS 4n 1415 Permission to add a new file to a directory. 1416 .RE 1417 1418 .sp 1419 .ne 2 1420 .na 1421 \fBappend_data (\fBp\fR)\fR 1422 .ad 1423 .sp .6 1424 .RS 4n 1425 The ability to modify a file's data, but only starting at EOF. 1426 .RE 1427 1428 .sp 1429 .ne 2 1430 .na 1431 \fBadd_subdirectory (\fBp\fR)\fR 1432 .ad 1433 .sp .6 1434 .RS 4n 1435 Permission to create a subdirectory to a directory. 1436 .RE 1437 1438 .sp 1439 .ne 2 1440 .na 1441 \fBread_xattr (\fBR\fR)\fR 1442 .ad 1443 .sp .6 1444 .RS 4n 1445 Ability to read the extended attributes of a file. 1446 .RE 1447 1448 .sp 1449 .ne 2 1450 .na 1451 \fBwrite_xattr (\fBW\fR)\fR 1452 .ad 1453 .sp .6 1454 .RS 4n 1455 Ability to create extended attributes or write to the extended attribute 1456 directory. 1457 .RE 1458 1459 .sp 1460 .ne 2 1461 .na 1462 \fBexecute (\fBx\fR)\fR 1463 .ad 1464 .sp .6 1465 .RS 4n 1466 Permission to execute a file. 1467 .RE 1468 1469 .sp 1470 .ne 2 1471 .na 1472 \fBread_attributes (\fBa\fR)\fR 1473 .ad 1474 .sp .6 1475 .RS 4n 1476 The ability to read basic attributes (non-ACLs) of a file. 1477 .RE 1478 1479 .sp 1480 .ne 2 1481 .na 1482 \fBwrite_attributes (\fBA\fR)\fR 1483 .ad 1484 .sp .6 1485 .RS 4n 1486 Permission to change the times associated with a file or directory to an 1487 arbitrary value. 1488 .RE 1489 1490 .sp 1491 .ne 2 1492 .na 1493 \fBdelete (\fBd\fR)\fR 1494 .ad 1495 .sp .6 1496 .RS 4n 1497 Permission to delete a file. 1498 .RE 1499 1500 .sp 1501 .ne 2 1502 .na 1503 \fBdelete_child (\fBD\fR)\fR 1504 .ad 1505 .sp .6 1506 .RS 4n 1507 Permission to delete a file within a directory. 1508 .RE 1509 1510 .sp 1511 .ne 2 1512 .na 1513 \fBread_acl (\fBc\fR)\fR 1514 .ad 1515 .sp .6 1516 .RS 4n 1517 Permission to read the ACL of a file. 1518 .RE 1519 1520 .sp 1521 .ne 2 1522 .na 1523 \fBwrite_acl (\fBC\fR)\fR 1524 .ad 1525 .sp .6 1526 .RS 4n 1527 Permission to write the ACL of a file. 1528 .RE 1529 1530 .sp 1531 .ne 2 1532 .na 1533 \fBwrite_owner (\fBo\fR)\fR 1534 .ad 1535 .sp .6 1536 .RS 4n 1537 Permission to change the owner of a file. 1538 .RE 1539 1540 .sp 1541 .ne 2 1542 .na 1543 \fBsynchronize (\fBs\fR)\fR 1544 .ad 1545 .sp .6 1546 .RS 4n 1547 Permission to access file locally at server with synchronize reads and writes. 1548 .RE 1549 1550 .sp 1551 .ne 2 1552 .na 1553 \fB\fB-\fR\fR 1554 .ad 1555 .sp .6 1556 .RS 4n 1557 No permission granted 1558 .RE 1559 1560 The following inheritance flags, supported by the NFSv4 ACL model, are 1561 displayed by using the \fB-v\fR or \fB-V\fR options: 1562 .sp 1563 .ne 2 1564 .na 1565 \fBfile_inherit (\fBf\fR)\fR 1566 .ad 1567 .sp .6 1568 .RS 4n 1569 Inherit to all newly created files. 1570 .RE 1571 1572 .sp 1573 .ne 2 1574 .na 1575 \fBdir_inherit (\fBd\fR)\fR 1576 .ad 1577 .sp .6 1578 .RS 4n 1579 Inherit to all newly created directories. 1580 .RE 1581 1582 .sp 1583 .ne 2 1584 .na 1585 \fBinherit_only (\fBi\fR)\fR 1586 .ad 1587 .sp .6 1588 .RS 4n 1589 When placed on a directory, do not apply to the directory, only to newly 1590 created files and directories. This flag requires that either 1591 \fBfile_inherit\fR and or \fBdir_inherit\fR is also specified. 1592 .RE 1593 1594 .sp 1595 .ne 2 1596 .na 1597 \fBno_propagate (\fBn\fR)\fR 1598 .ad 1599 .sp .6 1600 .RS 4n 1601 Indicates that ACL entries should be inherited to objects in a directory, but 1602 inheritance should stop after descending one level. This flag is dependent upon 1603 either \fBfile_inherit\fR and or \fBdir_inherit\fR also being specified. 1604 .RE 1605 1606 .sp 1607 .ne 2 1608 .na 1609 \fBsuccessful_access (\fBS\fR)\fR 1610 .ad 1611 .sp .6 1612 .RS 4n 1613 Indicates if an alarm or audit record should be initiated upon successful 1614 accesses. Used with audit/alarm ACE types. 1615 .RE 1616 1617 .sp 1618 .ne 2 1619 .na 1620 \fBfailed_access (\fBF\fR)\fR 1621 .ad 1622 .sp .6 1623 .RS 4n 1624 Indicates if an alarm or audit record should be initiated when access fails. 1625 Used with audit/alarm ACE types. 1626 .RE 1627 1628 .sp 1629 .ne 2 1630 .na 1631 \fBinherited (\fBI\fR)\fR 1632 .ad 1633 .sp .6 1634 .RS 4n 1635 ACE was inherited. 1636 .RE 1637 1638 .sp 1639 .ne 2 1640 .na 1641 \fB\fB-\fR\fR 1642 .ad 1643 .sp .6 1644 .RS 4n 1645 No permission granted. 1646 .RE 1647 1648 \fIaccess_type\fR is displayed as one of the following types: 1649 .sp 1650 .ne 2 1651 .na 1652 \fBalarm\fR 1653 .ad 1654 .RS 9n 1655 Permission field that specifies permissions that should trigger an alarm. 1656 .RE 1657 1658 .sp 1659 .ne 2 1660 .na 1661 \fBallow\fR 1662 .ad 1663 .RS 9n 1664 Permission field that specifies allow permissions. 1665 .RE 1666 1667 .sp 1668 .ne 2 1669 .na 1670 \fBaudit\fR 1671 .ad 1672 .RS 9n 1673 Permission field that specifies permissions that should be audited. 1674 .RE 1675 1676 .sp 1677 .ne 2 1678 .na 1679 \fBdeny\fR 1680 .ad 1681 .RS 9n 1682 Permission field that specifies deny permissions. 1683 .RE 1684 1685 For example: 1686 .sp 1687 .in +2 1688 .nf 1689 $ ls -dV /sandbox/dir.1 1690 drwxr-xr-x+ 2 root root 2 Jan 17 15:09 dir.1 1691 user:marks:r-------------:fd-----:allow 1692 owner@:--------------:-------:deny 1693 owner@:rwxp---A-W-Co-:-------:allow 1694 group@:-w-p----------:-------:deny 1695 group@:r-x-----------:-------:allow 1696 everyone@:-w-p---A-W-Co-:-------:deny 1697 everyone@:r-x---a-R-c--s:-------:allow 1698 $ 1699 ||||||||||||||||:||||||+ inherited access 1700 ||||||||||||||:||||||+ failed access 1701 ||||||||||||||:|||||+--success access 1702 ||||||||||||||:||||+-- no propagate 1703 ||||||||||||||:|||+--- inherit only 1704 ||||||||||||||:||+---- directory inherit 1705 ||||||||||||||:|+----- file inherit 1706 |||||||||||||| 1707 ||||||||||||||+ sync 1708 |||||||||||||+- change owner 1709 ||||||||||||+-- write ACL 1710 |||||||||||+--- read ACL 1711 ||||||||||+---- write extended attributes 1712 |||||||||+----- read extended attributes 1713 ||||||||+------ write attributes 1714 |||||||+------- read attributes 1715 ||||||+-------- delete child 1716 |||||+--------- delete 1717 ||||+---------- append 1718 |||+----------- execute 1719 ||+------------ write data 1720 |+------------- read data 1721 .fi 1722 .in -2 1723 .sp 1724 1725 .RE 1726 1727 .sp 1728 .ne 2 1729 .na 1730 \fB\fB-w\fR \fIcols\fR\fR 1731 .ad 1732 .br 1733 .na 1734 \fB\fB--width\fR \fIcols\fR\fR 1735 .ad 1736 .sp .6 1737 .RS 4n 1738 Multi-column output where the column width is forced to \fIcols\fR. 1739 .RE 1740 1741 .sp 1742 .ne 2 1743 .na 1744 \fB\fB-x\fR\fR 1745 .ad 1746 .sp .6 1747 .RS 4n 1748 Multi-column output with entries sorted across rather than down the page. 1749 .RE 1750 1751 .sp 1752 .ne 2 1753 .na 1754 \fB\fB-1\fR\fR 1755 .ad 1756 .sp .6 1757 .RS 4n 1758 Prints one entry per line of output. 1759 .RE 1760 1761 .sp 1762 .ne 2 1763 .na 1764 \fB\fB-@\fR\fR 1765 .ad 1766 .sp .6 1767 .RS 4n 1768 The same as \fB-l\fR, except that extended attribute information overrides 1769 \fBACL\fR information. An \fB@\fR is displayed after the file permission bits 1770 for files that have extended attributes. 1771 .RE 1772 1773 .sp 1774 .ne 2 1775 .na 1776 \fB\fB-c\fR | \fB-v\fR\fR 1777 .ad 1778 .sp .6 1779 .RS 4n 1780 The same as \fB-l\fR, and in addition displays the extended system attributes 1781 associated with the file when extended system attributes are fully supported by 1782 the underlying file system. The option \fB-/\fR supports two option arguments 1783 \fBc\fR (compact mode) and \fBv\fR (verbose mode). 1784 .sp 1785 .ne 2 1786 .na 1787 \fB\fBappendonly\fR\fR 1788 .ad 1789 .sp .6 1790 .RS 4n 1791 Allows a file to be modified only at offset \fBEOF\fR. Attempts to modify a 1792 file at a location other than \fBEOF\fR fails with \fBEPERM\fR. 1793 .RE 1794 1795 .sp 1796 .ne 2 1797 .na 1798 \fB\fBarchive\fR\fR 1799 .ad 1800 .sp .6 1801 .RS 4n 1802 Indicates if a file has been modified since it was last backed up. Whenever the 1803 modification time (\fBmtime\fR) of a file is changed the \fBarchive\fR 1804 attribute is set. 1805 .RE 1806 1807 .sp 1808 .ne 2 1809 .na 1810 \fB\fBav_modified\fR\fR 1811 .ad 1812 .sp .6 1813 .RS 4n 1814 ZFS sets the anti-virus attribute which whenever a file's content or size 1815 changes or when the file is renamed. 1816 .RE 1817 1818 .sp 1819 .ne 2 1820 .na 1821 \fB\fBav_quarantined\fR\fR 1822 .ad 1823 .sp .6 1824 .RS 4n 1825 Anti-virus software sets to mark a file as quarantined. 1826 .RE 1827 1828 .sp 1829 .ne 2 1830 .na 1831 \fB\fBcrtime\fR\fR 1832 .ad 1833 .sp .6 1834 .RS 4n 1835 Timestamp when a file is created. 1836 .RE 1837 1838 .sp 1839 .ne 2 1840 .na 1841 \fB\fBhidden\fR\fR 1842 .ad 1843 .sp .6 1844 .RS 4n 1845 Marks a file as hidden. 1846 .RE 1847 1848 .sp 1849 .ne 2 1850 .na 1851 \fB\fBimmutable\fR\fR 1852 .ad 1853 .sp .6 1854 .RS 4n 1855 Prevents the content of a file from being modified. Also prevents all metadata 1856 changes, except for access time updates. When placed on a directory, prevents 1857 the deletion and creation of files in the directories. Attempts to modify the 1858 content of a file or directory marked as \fBimmutable\fR fail with \fBEPERM\fR. 1859 Attempts to modify any attributes (with the exception of access time and, with 1860 the proper privileges, the \fBimmutable\fR) of a file marked as \fBimmutable\fR 1861 fails with \fBEPERM\fR. 1862 .RE 1863 1864 .sp 1865 .ne 2 1866 .na 1867 \fB\fBnodump\fR\fR 1868 .ad 1869 .sp .6 1870 .RS 4n 1871 Solaris systems have no special semantics for this attribute. 1872 .RE 1873 1874 .sp 1875 .ne 2 1876 .na 1877 \fB\fBnounlink\fR\fR 1878 .ad 1879 .sp .6 1880 .RS 4n 1881 Prevents a file from being deleted. On a directory, the attribute also prevents 1882 any changes to the contents of the directory. That is, no files within the 1883 directory can be removed or renamed. The \fBerrno\fR \fBEPERM\fR is returned 1884 when attempting to unlink or rename files and directories that are marked as 1885 \fBnounlink\fR. 1886 .RE 1887 1888 .sp 1889 .ne 2 1890 .na 1891 \fB\fBreadonly\fR\fR 1892 .ad 1893 .sp .6 1894 .RS 4n 1895 Marks a file as \fBreadonly\fR. Once a file is marked as \fBreadonly\fR the 1896 content data of the file cannot be modified. Other metadata for the file can 1897 still be modified. 1898 .RE 1899 1900 .sp 1901 .ne 2 1902 .na 1903 \fB\fBsystem\fR\fR 1904 .ad 1905 .sp .6 1906 .RS 4n 1907 Solaris systems have no special semantics for this attribute. 1908 .RE 1909 1910 .RE 1911 1912 .sp 1913 .LP 1914 The display characters used in compact mode (\fB-/ c\fR) are as follows: 1915 .sp 1916 .in +2 1917 .nf 1918 Attribute Name Display 1919 archive A 1920 hidden H 1921 readonly R 1922 system S 1923 appendonly a 1924 nodump d 1925 immutable i 1926 av_modified m 1927 av_quarantined q 1928 nounlink u 1929 .fi 1930 .in -2 1931 .sp 1932 1933 .sp 1934 .LP 1935 The display in verbose mode (/ v) uses full attribute names when it is set and 1936 the name prefixed by 'no' when it is not set. 1937 .sp 1938 .LP 1939 The attribute name \fBcrtime\fR and all other timestamps are handled by the 1940 option \fB-%\fR with the respective timestamp option arguments and also with 1941 \fBall\fR option argument. The display positions are as follows: The display in 1942 verbose mode (\fB-/ v\fR) uses full attribute names when it is set and the 1943 name prefixed by \fBno\fR when it is not set. The attribute name \fBcrtime\fR 1944 and all other timestamps are handled by the option \fB-%\fR with the respective 1945 timestamp option arguments and also with \fBall\fR option argument. 1946 .sp 1947 .LP 1948 The display positions are as follows: 1949 .sp 1950 .in +2 1951 .nf 1952 {||||||||||} 1953 |||||||||+- u (nounlink) 1954 ||||||||+-- q (av_quarantined) 1955 |||||||+--- m (av_modified) 1956 ||||||+---- i (immutable) 1957 |||||+----- d (nodump) 1958 ||||+------ a (appendonly) 1959 |||+------- S (system) 1960 ||+-------- R (readonly) 1961 |+--------- H (hidden) 1962 +---------- A (archive) 1963 .fi 1964 .in -2 1965 .sp 1966 1967 .sp 1968 .in +2 1969 .nf 1970 -% atime | crtime | ctime | mtime | all 1971 .fi 1972 .in -2 1973 .sp 1974 1975 .sp 1976 .ne 2 1977 .na 1978 \fB\fBatime\fR\fR 1979 .ad 1980 .sp .6 1981 .RS 4n 1982 Equivalent to \fB-u\fR. 1983 .RE 1984 1985 .sp 1986 .ne 2 1987 .na 1988 \fB\fBcrtime\fR\fR 1989 .ad 1990 .sp .6 1991 .RS 4n 1992 Uses the creation time of the file for sorting or printing. 1993 .RE 1994 1995 .sp 1996 .ne 2 1997 .na 1998 \fB\fBctime\fR\fR 1999 .ad 2000 .sp .6 2001 .RS 4n 2002 Equivalent to \fB-c\fR. 2003 .RE 2004 2005 .sp 2006 .ne 2 2007 .na 2008 \fB\fBmtime\fR\fR 2009 .ad 2010 .sp .6 2011 .RS 4n 2012 Uses the last modification time of the file contents for sorting or printing. 2013 .RE 2014 2015 .sp 2016 .LP 2017 If extended system attributes are not supported or if the user does not have 2018 \fBread\fR permission on the file or if the \fBcrtime\fR extended attribute is 2019 not set, \fBcrtime\fR is treated as a synonym for \fBmtime\fR. 2020 .sp 2021 .LP 2022 When option argument \fB-all\fR is specified, all available timestamps are 2023 printed which includes \fB-atime\fR, \fB-ctime\fR, \fB-mtime\fR and on the 2024 extended system attribute supporting file systems, \fB-crtime\fR (create time). 2025 The option \fB-% all\fR does not effect which timestamp is displayed in long 2026 format and does not affect sorting. 2027 .sp 2028 .ne 2 2029 .na 2030 \fB\fB--block-size\fR \fIsize\fR\fR 2031 .ad 2032 .sp .6 2033 .RS 4n 2034 Display sizes in multiples of size. Size can be scaled by suffixing one of 2035 \fBYyZzEePpTtGgMmKk\fR. Additionally, a \fBB\fR can be placed at the end to 2036 indicate powers of 10 instead of 2. For example, . \fB10mB\fR means blocks of 2037 \fB10000000\fR bytes while \fB10m\fR means blocks of \fB10*2^20 -- 10485760 2038 --\fR bytes. This is mutually exclusive with the \fB-h\fR option. 2039 .RE 2040 2041 .sp 2042 .ne 2 2043 .na 2044 \fB\fB--color\fR \fB[=\fR\fIwhen\fR\fB]\fR\fR 2045 .ad 2046 .br 2047 .na 2048 \fB\fB--colour\fR\fB[=\fR\fIwhen\fR\fB]\fR\fR 2049 .ad 2050 .sp .6 2051 .RS 4n 2052 Display filenames using color on color-capable terminals. \fIwhen\fR is an 2053 optional argument that determines when to display color output. 2054 .sp 2055 Possible values for \fIwhen\fR are: 2056 .sp 2057 .ne 2 2058 .na 2059 \fB\fBalways\fR\fR 2060 .ad 2061 .br 2062 .na 2063 \fB\fByes\fR\fR 2064 .ad 2065 .br 2066 .na 2067 \fB\fBforce\fR\fR 2068 .ad 2069 .sp .6 2070 .RS 4n 2071 Always use color. 2072 .RE 2073 2074 .sp 2075 .ne 2 2076 .na 2077 \fB\fBauto\fR\fR 2078 .ad 2079 .br 2080 .na 2081 \fB\fBtty\fR\fR 2082 .ad 2083 .br 2084 .na 2085 \fB\fBif-tty\fR\fR 2086 .ad 2087 .sp .6 2088 .RS 4n 2089 Use color if a terminal is present. 2090 .RE 2091 2092 .sp 2093 .ne 2 2094 .na 2095 \fB\fBno\fR\fR 2096 .ad 2097 .br 2098 .na 2099 \fB\fBnever\fR\fR 2100 .ad 2101 .br 2102 .na 2103 \fB\fBnone\fR\fR 2104 .ad 2105 .sp .6 2106 .RS 4n 2107 Never use color. This is the default 2108 .RE 2109 2110 See \fBCOLOR OUTPUT\fR for information on how to control the output colors. 2111 .RE 2112 2113 .sp 2114 .ne 2 2115 .na 2116 \fB\fB--file-type\fR\fR 2117 .ad 2118 .sp .6 2119 .RS 4n 2120 Display a suffix after a file depending on it's type, similar to the \fB-F\fR 2121 option, except \fB*\fR is not appended to executable files. 2122 .RE 2123 2124 .sp 2125 .ne 2 2126 .na 2127 \fB\fB-si\fR\fR 2128 .ad 2129 .br 2130 .na 2131 \fB\fB--\fR\fR 2132 .ad 2133 .sp .6 2134 .RS 4n 2135 Display human scaled sizes similar to the \fB-h\fR option, except values are 2136 repeatedly divided by 1000 instead of 1024. The last option \fB--si\fR or 2137 \fB-h\fR determines the divisor used. 2138 .RE 2139 2140 .sp 2141 .ne 2 2142 .na 2143 \fB\fB--time-style\fR style\fR 2144 .ad 2145 .sp .6 2146 .RS 4n 2147 Display times using the specified style. This does not effect the times 2148 displayed for extended attributes (\fB-%\fR). 2149 .sp 2150 Possible values for \fIstyle\fR are: 2151 .sp 2152 .ne 2 2153 .na 2154 \fB\fBfull-iso\fR\fR 2155 .ad 2156 .sp .6 2157 .RS 4n 2158 Equivalent to \fB-E\fR. 2159 .RE 2160 2161 .sp 2162 .ne 2 2163 .na 2164 \fB\fBlong-iso\fR\fR 2165 .ad 2166 .sp .6 2167 .RS 4n 2168 Display in \fIYYYY-MM-DD HH:MM\fR for all files. 2169 .RE 2170 2171 .sp 2172 .ne 2 2173 .na 2174 \fB\fBiso\fR\fR 2175 .ad 2176 .sp .6 2177 .RS 4n 2178 Display older files using \fIYYYY-MM-DD\fR and newer files with \fIMM-DD 2179 HH:MM\fR. 2180 .RE 2181 2182 .sp 2183 .ne 2 2184 .na 2185 \fB\fBlocale\fR\fR 2186 .ad 2187 .sp .6 2188 .RS 4n 2189 Use the default locale format for old and new files. This is the default. 2190 .RE 2191 2192 .sp 2193 .ne 2 2194 .na 2195 \fB\fB+FORMAT\fR\fR 2196 .ad 2197 .sp .6 2198 .RS 4n 2199 Use a custom format. Values are the same as described in \fBstrftime\fR(3C). If 2200 a NEWLINE appears in the string, the first line is used for older files and the 2201 second line is used for newer files. Otherwise, the given format is used for 2202 all files. 2203 .RE 2204 2205 .RE 2206 2207 .SS "/usr/bin/ls" 2208 .sp 2209 .ne 2 2210 .na 2211 \fB\fB-F\fR\fR 2212 .ad 2213 .sp .6 2214 .RS 4n 2215 Marks directories with a trailing slash (\fB/\fR), doors with a trailing 2216 greater-than sign (\fB>\fR), executable files with a trailing asterisk 2217 (\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links 2218 with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets 2219 with a trailing equals sign (\fB=\fR). Follows \fBsymlinks\fR named as 2220 operands. 2221 .RE 2222 2223 .sp 2224 .ne 2 2225 .na 2226 \fB\fB--file-type\fR\fR 2227 .ad 2228 .sp .6 2229 .RS 4n 2230 Marks entries as with \fB-F\fR with the exception of executable files. 2231 Executable files are not marked. Follows symlinks named as operands. 2232 .RE 2233 2234 .sp 2235 .LP 2236 Specifying more than one of the options in the following mutually exclusive 2237 pairs is not considered an error: \fB-C\fR and \fB-l\fR (ell), \fB-m\fR and 2238 \fB-l\fR (ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR (ell). The 2239 \fB-l\fR option overrides the other option specified in each pair. 2240 .sp 2241 .LP 2242 Specifying more than one of the options in the following mutually exclusive 2243 groups is not considered an error: \fB-C\fR and \fB-1\fR (one), \fB-H\fR and 2244 \fB-L\fR, \fB-c\fR and \fB-u\fR, and \fB-e\fR and \fB-E\fR, and \fB-t\fR and 2245 \fB-S\fR. The last option specifying a specific timestamp (\fB-c\fR, \fB-u\fR, 2246 \fB-% atime\fR , \fB-% crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR) 2247 determines the timestamps used for sorting or in long format listings. The last 2248 option \fB-t\fR, \fB-S\fR, or \fB-U\fR determines the sorting behavior. 2249 .SS "/usr/xpg4/bin/ls" 2250 .sp 2251 .ne 2 2252 .na 2253 \fB\fB-F\fR\fR 2254 .ad 2255 .sp .6 2256 .RS 4n 2257 Marks directories with a trailing slash (\fB/\fR), doors with a trailing 2258 greater-than sign (\fB>\fR), executable files with a trailing asterisk 2259 (\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links 2260 with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets 2261 with a trailing equals sign (\fB=\fR). Follows symlinks named as operands. 2262 .RE 2263 2264 .sp 2265 .ne 2 2266 .na 2267 \fB\fB--file-type\fR\fR 2268 .ad 2269 .sp .6 2270 .RS 4n 2271 Marks entries as with \fB-F\fR with the exception of executable files. 2272 Executable files are not marked. Follows symlinks named as operands. 2273 .RE 2274 2275 .sp 2276 .LP 2277 Specifying more than one of the options in the following groups of mutually 2278 exclusive options is not considered an error: \fB-C\fR and \fB-l\fR (ell), 2279 \fB-m\fR and \fB-l\fR (ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR 2280 (ell), \fB-C\fR and \fB-1\fR (one), \fB-H\fR and \fB-L\fR, \fB-c\fR and 2281 \fB-u\fR, \fB-e\fR and \fB-E\fR, \fB-t\fR and \fB-S\fR and \fB-U\fR. The last 2282 option specifying a specific timestamp (\fB-c\fR, \fB-u\fR, \fB-% atime\fR , 2283 \fB-% crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR) determines the timestamps 2284 used for sorting or in long format listings. The last \fB-t\fR, \fB-S\fR, or 2285 \fB-U\fR option determines the sorting behavior. 2286 .SS "/usr/xpg6/bin/ls" 2287 .sp 2288 .ne 2 2289 .na 2290 \fB\fB-F\fR\fR 2291 .ad 2292 .sp .6 2293 .RS 4n 2294 Marks directories with a trailing slash (\fB/\fR), doors with a trailing 2295 greater-than sign (\fB>\fR), executable files with a trailing asterisk 2296 (\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links 2297 with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets 2298 with a trailing equals sign (\fB=\fR). Does not follow symlinks named as 2299 operands unless the \fB-H\fR or \fB-L\fR option is specified. 2300 .RE 2301 2302 .sp 2303 .ne 2 2304 .na 2305 \fB\fB--file-type\fR\fR 2306 .ad 2307 .sp .6 2308 .RS 4n 2309 Marks entries as with \fB-F\fR with the exception of executable files. 2310 Executable files are not marked. Does not follow symlinks named as operands 2311 unless the \fB-H\fR or \fB-L\fR option is specified. 2312 .RE 2313 2314 .sp 2315 .LP 2316 Specifying more than one of the options in the following mutually exclusive 2317 pairs is not considered an error: \fB-C\fR and \fB-l\fR (ell), m and 2318 \fB-l\fR(ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR (ell), 2319 \fB-C\fR and \fB-1\fR (one), \fB-H\fR and -\fB-L\fR, \fB-c\fR and \fB-u\fR, 2320 \fB-e\fR and \fB-E\fR, \fB-t\fR and \fB-S\fR and \fB-U\fR. The last option 2321 specifying a specific timestamp (\fB-c\fR, \fB-u\fR, \fB-% atime\fR , \fB-% 2322 crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR) determines the timestamps used 2323 for sorting or in long format listings. The last \fB-t\fR, \fB-S\fR, or 2324 \fB-U\fR option determines the sorting behavior. 2325 .SH OPERANDS 2326 .sp 2327 .LP 2328 The following operand is supported: 2329 .sp 2330 .ne 2 2331 .na 2332 \fB\fIfile\fR\fR 2333 .ad 2334 .sp .6 2335 .RS 4n 2336 A path name of a file to be written. If the file specified is not found, a 2337 diagnostic message is output on standard error. 2338 .RE 2339 2340 .SH USAGE 2341 .sp 2342 .LP 2343 See \fBlargefile\fR(5) for the description of the behavior of \fBls\fR when 2344 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes). 2345 .SH EXAMPLES 2346 .LP 2347 \fBExample 1 \fRViewing File Permissions 2348 .sp 2349 .LP 2350 The following example shows how to display detailed information about a file. 2351 2352 .sp 2353 .in +2 2354 .nf 2355 % ls -l file.1 2356 -rw-r--r-- 1 gozer staff 206663 Mar 14 10:15 file.1 2357 .fi 2358 .in -2 2359 .sp 2360 2361 .sp 2362 .LP 2363 The permissions string above (\fB-rw-r--r--\fR) describes that the file owner 2364 has read and write permissions, the owning group has read permissions, and 2365 others have read permissions. 2366 2367 .sp 2368 .LP 2369 The following example shows how to display detailed information about a 2370 directory. 2371 2372 .sp 2373 .in +2 2374 .nf 2375 % ls -ld test.dir 2376 drwxr-xr-x 2 gozer staff 2 Mar 14 10:17 test.dir 2377 .fi 2378 .in -2 2379 .sp 2380 2381 .sp 2382 .LP 2383 The permissions string above (\fBdrwxr-xr-x\fR) describes that the directory 2384 owner has read, write, and search permissions, the owning group has read and 2385 search permissions, and others have read and search permissions. 2386 2387 .sp 2388 .LP 2389 Another example of listing file permissions is as follows: 2390 2391 .sp 2392 .in +2 2393 .nf 2394 % ls -l file.2 2395 -rw-rwl--- 1 gozer staff 206663 Mar 14 10:47 file.2 2396 .fi 2397 .in -2 2398 .sp 2399 2400 .sp 2401 .LP 2402 The permissions string above (\fB-rw-rwl---\fR) describes that the file owner 2403 has read and write permissions, the owning group has read and write 2404 permissions, and the file can be locked during access. 2405 2406 .LP 2407 \fBExample 2 \fRDisplaying ACL Information on Files and Directories 2408 .sp 2409 .LP 2410 The following example shows how to display verbose ACL information on a ZFS 2411 file. 2412 2413 .sp 2414 .in +2 2415 .nf 2416 % ls -v file.1 2417 -rw-r--r-- 1 marks staff 206663 Mar 14 10:15 file.1 2418 0:owner@:execute:deny 2419 1:owner@:read_data/write_data/append_data/write_xattr/write_attributes 2420 /write_acl/write_owner:allow 2421 2:group@:write_data/append_data/execute:deny 2422 3:group@:read_data:allow 2423 4:everyone@:write_data/append_data/write_xattr/execute/write_attributes 2424 /write_acl/write_owner:deny 2425 5:everyone@:read_data/read_xattr/read_attributes/read_acl/synchronize 2426 :allow 2427 .fi 2428 .in -2 2429 .sp 2430 2431 .sp 2432 .LP 2433 The following example shows how to display compact ACL information on a ZFS 2434 directory. 2435 2436 .sp 2437 .in +2 2438 .nf 2439 % ls -dV test.dir 2440 drwxr-xr-x 2 marks staff 2 Mar 14 10:17 test.dir 2441 owner@:--------------:------:deny 2442 owner@:rwxp---A-W-Co-:------:allow 2443 group@:-w-p----------:------:deny 2444 group@:r-x-----------:------:allow 2445 everyone@:-w-p---A-W-Co-:------:deny 2446 everyone@:r-x---a-R-c--s:------:allow 2447 .fi 2448 .in -2 2449 .sp 2450 2451 .sp 2452 .LP 2453 The following example illustrates the \fBls\fR \fB-v\fR behavior when listing 2454 ACL information on a UFS file. 2455 2456 .sp 2457 .in +2 2458 .nf 2459 $ ls -v file.3 2460 -rw-r--r-- 1 root root 2703 Mar 14 10:59 file.3 2461 0:user::rw- 2462 1:group::r-- #effective:r-- 2463 2:mask:r-- 2464 3:other:r-- 2465 .fi 2466 .in -2 2467 .sp 2468 2469 .LP 2470 \fBExample 3 \fRPrinting the Names of All Files 2471 .sp 2472 .LP 2473 The following example prints the names of all files in the current directory, 2474 including those that begin with a dot (\fB\&.\fR), which normally do not print: 2475 2476 .sp 2477 .in +2 2478 .nf 2479 example% \fBls -a\fR 2480 .fi 2481 .in -2 2482 .sp 2483 2484 .LP 2485 \fBExample 4 \fRProviding File Information 2486 .sp 2487 .LP 2488 The following example provides file information: 2489 2490 .sp 2491 .in +2 2492 .nf 2493 example% ls -aisn 2494 .fi 2495 .in -2 2496 .sp 2497 2498 .sp 2499 .LP 2500 This command provides information on \fBa\fRll files, including those that 2501 begin with a dot (\fBa\fR), the \fBi\fR-number, the memory address of the 2502 i-node associated with the file\(emprinted in the left-hand column (\fBi\fR); 2503 the \fBs\fRize (in blocks) of the files, printed in the column to the right of 2504 the i-numbers (\fBs\fR); finally, the report is displayed in the \fBn\fRumeric 2505 version of the long list, printing the \fBUID\fR (instead of user name) and 2506 \fBGID\fR (instead of group name) numbers associated with the files. 2507 2508 .sp 2509 .LP 2510 When the sizes of the files in a directory are listed, a total count of blocks, 2511 including indirect blocks, is printed. 2512 2513 .LP 2514 \fBExample 5 \fRProviding Extended System Attributes Information 2515 .sp 2516 .in +2 2517 .nf 2518 example% ls -/ c file (extended system attribute in compact mode) 2519 -rw-r--r-- 1 root root 0 May 10 14:17 file 2520 {AHRSadim-u} 2521 .fi 2522 .in -2 2523 .sp 2524 2525 .sp 2526 .LP 2527 In this example, \fBav_quarantined\fR is not set. 2528 .sp 2529 .in +2 2530 .nf 2531 example% ls -/ v file (extended system attribute in verbose mode) 2532 -rw-r--r-- 1 root root 0 May 10 14:17 file 2533 {archive,hidden,readonly,system,appendonly\e 2534 nodump,immutable,av_modified,\e 2535 noav_quarantined,nounlink} 2536 2537 example% ls -/ v file (no extended system attribute) 2538 -rw-r--r-- 1 root staff 0 May 16 14:48 file 2539 {} 2540 2541 example% ls -/ c file (extended system attribute 2542 supported file system) 2543 2544 -rw-r--r-- 1 root staff 3 Jun 4 22:04 file 2545 {A------m--} 2546 .fi 2547 .in -2 2548 .sp 2549 2550 .sp 2551 .LP 2552 \fBarchive\fR and \fBav_modified\fR attributes are set by default on an 2553 extended system attribute supported file. 2554 .sp 2555 .in +2 2556 .nf 2557 example% ls -/ c -%crtime file 2558 2559 -rw-r--r-- root root 0 May 10 14:17 file 2560 {AHRSadim-u} 2561 .fi 2562 .in -2 2563 .sp 2564 2565 .sp 2566 .LP 2567 This example displays the timestamp as the creation time: 2568 .sp 2569 .in +2 2570 .nf 2571 example% ls -l -%all file 2572 -rw-r--r-- 1 root root 0 May 10 14:17 file 2573 timestamp: atime Jun 14 08:47:37 2007 2574 timestamp: ctime May 10 14:20:23 2007 2575 timestamp: mtime May 10 14:17:56 2007 2576 timestamp: crtime May 10 14:17:56 2007 2577 2578 example% ls -%crtime -tl file* 2579 2580 -rw-r--r-- 1 foo staff 3 Jun 4 22:04 file1 2581 -rw-r--r-- 1 root root 0 May 10 14:17 file 2582 -rw-r--r-- 1 foo staff 0 May 9 13:49 file.1 2583 .fi 2584 .in -2 2585 .sp 2586 2587 .sp 2588 .LP 2589 In this example the files are sorted by creation time. 2590 .SH ENVIRONMENT VARIABLES 2591 .sp 2592 .LP 2593 See \fBenviron\fR(5) for descriptions of the following environment variables 2594 that affect the execution of \fBls\fR: \fBLANG\fR, \fBLC_ALL\fR, 2595 \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR, 2596 \fBNLSPATH\fR, and \fBTZ\fR. 2597 .sp 2598 .ne 2 2599 .na 2600 \fB\fBCOLUMNS\fR\fR 2601 .ad 2602 .sp .6 2603 .RS 4n 2604 Determines the user's preferred column position width for writing multiple 2605 text-column output. If this variable contains a string representing a decimal 2606 integer, the \fBls\fR utility calculates how many path name text columns to 2607 write (see \fB-C\fR) based on the width provided. If \fBCOLUMNS\fR is not set 2608 or is invalid, 80 is used. The column width chosen to write the names of files 2609 in any given directory is constant. File names are not be truncated to fit into 2610 the multiple text-column output. 2611 .RE 2612 2613 .sp 2614 .ne 2 2615 .na 2616 \fB\fBLS_COLORS\fR\fR 2617 .ad 2618 .sp .6 2619 .RS 4n 2620 Determines the coloring scheme used when displaying color output. If not set 2621 and color output is specified, a default scheme is used. If TERM is not set, no 2622 color output is used. 2623 .RE 2624 2625 .sp 2626 .ne 2 2627 .na 2628 \fB\fBTERM\fR\fR 2629 .ad 2630 .sp .6 2631 .RS 4n 2632 Determine the terminal type. If this variable is unset or NULL, no color output 2633 is generated regardless of the value of the --color option. 2634 .RE 2635 2636 .SH EXIT STATUS 2637 .sp 2638 .ne 2 2639 .na 2640 \fB\fB0\fR\fR 2641 .ad 2642 .RS 6n 2643 All information was written successfully. 2644 .RE 2645 2646 .sp 2647 .ne 2 2648 .na 2649 \fB\fB>0\fR\fR 2650 .ad 2651 .RS 6n 2652 An error occurred. 2653 .RE 2654 2655 .SH FILES 2656 .sp 2657 .ne 2 2658 .na 2659 \fB\fB/etc/group\fR\fR 2660 .ad 2661 .sp .6 2662 .RS 4n 2663 group IDs for \fBls\fR \fB-l\fR and \fBls\fR \fB-g\fR 2664 .RE 2665 2666 .sp 2667 .ne 2 2668 .na 2669 \fB\fB/etc/passwd\fR\fR 2670 .ad 2671 .sp .6 2672 .RS 4n 2673 user IDs for \fBls\fR \fB-l\fR and \fBls\fR \fB-o\fR 2674 .RE 2675 2676 .sp 2677 .ne 2 2678 .na 2679 \fB\fB/usr/share/lib/terminfo/?/*\fR\fR 2680 .ad 2681 .sp .6 2682 .RS 4n 2683 terminal information database 2684 .RE 2685 2686 .SH ATTRIBUTES 2687 .sp 2688 .LP 2689 See \fBattributes\fR(5) for descriptions of the following attributes: 2690 .SS "/usr/bin/ls" 2691 .sp 2692 2693 .sp 2694 .TS 2695 box; 2696 c | c 2697 l | l . 2698 ATTRIBUTE TYPE ATTRIBUTE VALUE 2699 _ 2700 CSI Enabled 2701 _ 2702 Interface Stability Committed 2703 _ 2704 Standard See below. 2705 .TE 2706 2707 .sp 2708 .LP 2709 For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR, 2710 \fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR, 2711 \fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR, 2712 \fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR, 2713 \fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR, 2714 \fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR, 2715 \fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR, 2716 \fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(5). 2717 .SS "/usr/xpg4/bin/ls" 2718 .sp 2719 2720 .sp 2721 .TS 2722 box; 2723 c | c 2724 l | l . 2725 ATTRIBUTE TYPE ATTRIBUTE VALUE 2726 _ 2727 CSI Enabled 2728 _ 2729 Interface Stability Committed 2730 _ 2731 Standard See below. 2732 .TE 2733 2734 .sp 2735 .LP 2736 For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR, 2737 \fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR, 2738 \fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR, 2739 \fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR, 2740 \fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR, 2741 \fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR, 2742 \fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR, 2743 \fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(5). 2744 .SS "/usr/xpg6/bin/ls" 2745 .sp 2746 2747 .sp 2748 .TS 2749 box; 2750 c | c 2751 l | l . 2752 ATTRIBUTE TYPE ATTRIBUTE VALUE 2753 _ 2754 CSI Enabled 2755 _ 2756 Interface Stability Committed 2757 _ 2758 Standard See below. 2759 .TE 2760 2761 .sp 2762 .LP 2763 For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR, 2764 \fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR, 2765 \fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR, 2766 \fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR, 2767 \fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR, 2768 \fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR, 2769 \fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR, 2770 \fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(5). 2771 .SH SEE ALSO 2772 .sp 2773 .LP 2774 \fBchmod\fR(1), \fBcp\fR(1), \fBsetfacl\fR(1), \fBfgetattr\fR(3C), 2775 \fBstrftime\fR(3C), \fBterminfo\fR(4), \fBacl\fR(5), \fBattributes\fR(5), 2776 \fBenviron\fR(5), \fBfsattr\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5) 2777 .SH NOTES 2778 .sp 2779 .LP 2780 Unprintable characters in file names can confuse the columnar output options. 2781 .sp 2782 .LP 2783 The total block count is incorrect if there are hard links among the files. 2784 .sp 2785 .LP 2786 The sort order of \fBls\fR output is affected by the locale and can be 2787 overridden by the \fBLC_COLLATE\fR environment variable. For example, if 2788 \fBLC_COLLATE\fR equals \fBC\fR, dot files appear first, followed by names 2789 beginning with upper-case letters, then followed by names beginning with 2790 lower-case letters. But if \fBLC_COLLATE\fR equals \fBen_US.ISO8859-1\fR, then 2791 leading dots as well as case are ignored in determining the sort order.