how to list time of last access?

how to list time of last access?

Post by Newbie JrSysAdm » Mon, 30 Jul 2001 09:01:38



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?
 
 
 

how to list time of last access?

Post by Tony Curti » Mon, 30 Jul 2001 09:21:54


>> On 28 Jul 2001 17:01:38 -0700,

> 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?

Do you want to sort by this time, or actually "get" the
value?

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!

 
 
 

how to list time of last access?

Post by Rich Tee » Mon, 30 Jul 2001 14:14:16



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?

Everyone who has read the ls man page knows...

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

 
 
 

how to list time of last access?

Post by Newbie JrSysAdm » Tue, 31 Jul 2001 05:41:33




> > 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!

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.
 
 
 

how to list time of last access?

Post by Rich Tee » Tue, 31 Jul 2001 06:41:40



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.

Hey - we're all here to learn!

--
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?

2. boot to x window directly

3. Files' last accessed (read) time under SunOS

4. SCO response to Novell claims

5. Last Access Time

6. Setting up a ppp link

7. file last access time

8. URGENT: Oracle problem with MU7

9. Id Last Access Date/Time

10. last access time to CDROM

11. Finding files on the last access time

12. file last accessed ..number of time

13. Checking last access time for a file?