To sort ls' output, use the -u option (man ls).
If you want to play with the value in a program, you'll
need to stat() the file. (This you could do with perl for
instance).
hth
t
--
Beep beep! Out of my way, I'm a motorist!
Everyone who has read the ls man page knows...Quote:> i would like to use 'ls' to list files' time of last access. i can't
> figure out how to print this field. does anyone know?
man ls: you're just six keystrokes from ls nrivana!
--
Rich Teer
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-online.net
> > i would like to use 'ls' to list files' time of last access. i can't
> > figure out how to print this field. does anyone know?
> Everyone who has read the ls man page knows...
> man ls: you're just six keystrokes from ls nrivana!
Hey - we're all here to learn!Quote:> i apologize for having wasted this space. i had read the man pages for
> "ls -l -u" but somehow didn't think it would substitute the time of
> access for the time of update when it listed. my bad.
--
Rich Teer
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-online.net
1. A list of all users --last time when their accounts have been used
<no message supplied, but the subject says enough>
--
You forgot to state which operating system (OS) you need help with. If
you have an AIX, the information is contained in the output of the lsuser
command. I've written a perl script that creates a spreadsheet type
report from that data. If you have something like DG/UX, no such luck.
In that case, you need to rely on data contained in /etc/wtmp or
/var/adm/acct/nite/owtmp (command 'last'). (We do our accounting once
per month.) If you plan ahead, you can update a file in the user's home
directory. Other systems have other techniques, so knowledge of the OS
is important.
================================================================
Information Technology Group === Phone: 64 9 307-9999 x8133
Auckland Institute of Technology === Fax: 64 9 307-9901
PO Box 92006, Auckland, New Zealand =
================================================================
If we have unlimited ability to think, why do we use computers?
3. Files' last accessed (read) time under SunOS
4. SCO response to Novell claims
8. URGENT: Oracle problem with MU7
11. Finding files on the last access time
12. file last accessed ..number of time
13. Checking last access time for a file?