SCCS-vsn: bin/ls/ls.1 6.15
SCCS-vsn: bin/ls/print.c 5.24
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
-.\" @(#)ls.1 6.14 (Berkeley) %G%
+.\" @(#)ls.1 6.15 (Berkeley) %G%
.IR strmode (3)),
number of links, owner, size in bytes, and time of last modification
for each file.
.IR strmode (3)),
number of links, owner, size in bytes, and time of last modification
for each file.
+File times less than six months in the past are displayed as month,
+day, hour and minute, and file times more than six months in the past
+are displayed as month, day and year.
If the file is a special file the size field will instead contain
the major and minor device numbers.
If the file is a symbolic link the pathname of
If the file is a special file the size field will instead contain
the major and minor device numbers.
If the file is a symbolic link the pathname of
Display the sizes of files and directories in 512-byte blocks.
.TP
.B \-T
Display the sizes of files and directories in 512-byte blocks.
.TP
.B \-T
-By default, file times less than six months in the past are
-displayed as month, day, hour and minute, and file times more
-than six months in the past are displayed as month, day and
-year.
-The \-T option causes
-.I ls
-to display all file times as month, day, hour, and minute.
+Display complete time information for the file, including
+month, day, hour, minute, second, and year.
.TP
.B \-t
Sort by time modified (latest first) instead of
.TP
.B \-t
Sort by time modified (latest first) instead of
-static char sccsid[] = "@(#)print.c 5.23 (Berkeley) %G%";
+static char sccsid[] = "@(#)print.c 5.24 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
(void)putchar(longstring[i]);
#define SIXMONTHS ((DAYSPERNYEAR / 2) * SECSPERDAY)
(void)putchar(longstring[i]);
#define SIXMONTHS ((DAYSPERNYEAR / 2) * SECSPERDAY)
- if (f_sectime || ftime + SIXMONTHS > time((time_t *)NULL))
+ if (f_sectime)
+ for (i = 11; i < 24; i++)
+ (void)putchar(longstring[i]);
+ else if (ftime + SIXMONTHS > time((time_t *)NULL))
for (i = 11; i < 16; ++i)
(void)putchar(longstring[i]);
else {
for (i = 11; i < 16; ++i)
(void)putchar(longstring[i]);
else {