[oclug] Solaris ls command question?
Patrick Smith
patsmith at pobox.com
Tue Jun 8 13:01:19 EDT 2004
Ross Jordan wrote:
> It would seem todd.clattenburg at sdc-dsc.gc.ca, on Tue, Jun 08, 2004 at 11:55:05AM -0400, wrote:
>>I am working on Solaris 5.6. Don't laugh if this is a stupid question,
>>but, the 'ls -l' command shows the date and not the time. How do I get
>>it to show the date and the time?
>
> You can force it with ls -lc (ctime) ls -lu (mtime)
Are you sure about the last? It's been around three years since I last
used Solaris, but I remember 'ls -lu' as showing the access time, not
the modification time. Certainly GNU ls on my Linux box behaves that way.
GNU ls has a nice --time-style option. E.g.
$ ls -l --time-style=long-iso pl
-rw-r--r-- 1 pat pat 1682 2003-12-01 01:18 pl
$ ls -l pl
-rw-r--r-- 1 pat pat 1682 Dec 1 2003 pl
Of course, that doesn't help unless one has GNU ls somewhere on one's
Solaris box. :-(
More information about the OCLUG
mailing list