|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Last login
Hey I need to write a script for linux, sun, aix, and hp, using advanced bash scripting that will take the last user login for all users, and report back with the time they logged in. It doesn't matter if each OS needs a different command. Any Ideas on what file to go to or what kind of a command I could use on this?
|
|
#2
|
|||
|
|||
|
You can use last.
Works on sun, linux and hp. Don't know about aix (think it does). |
|
#3
|
|||
|
|||
|
this would work but it only goes back to when the temp file was made. it won't necessarily be over 30 days old, which is how old i need it to be. When you first log in in *nix doesn't it tell you last time you logged in? Where does that information come from and how can I get to it.?
|
|
#4
|
|||
|
|||
|
Ok, thought the extra info would be handy, but you are right about the file not going back 'forever'.
Take a look at lastlog Works on all os flavors you mentioned (and more). |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Last login |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|