![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| URGENT,URGENT- Need help tape drive installation | sriny | UNIX for Advanced & Expert Users | 3 | 11-16-2006 11:43 AM |
| URGENT---URGENT--No OK PROMPt after RSC CONFIG | sriny | SUN Solaris | 7 | 10-29-2006 07:06 AM |
| cannot login after changing login shell | hardesh | HP-UX | 4 | 09-13-2005 09:21 PM |
| please help urgent | mkan | UNIX for Dummies Questions & Answers | 5 | 09-08-2005 12:15 PM |
| urgent | xinubhaskar | UNIX for Advanced & Expert Users | 1 | 02-08-2003 06:37 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Last login<urgent>
how to find last login time of a user in faster way if wtmps size is too large??
|
| Forum Sponsor | ||
|
|
|
|||
|
>how to find last login time of a user in faster way if wtmps size is too large??
I though your question was the last login of A user, in such case my command to type should not take more than 4 seconds at the most or you have some trouble (the longest delay I got so far was 1.5!) I did not say to type last, as this will display all the successfull attempt of all the users since the origin of wtmp, but last <your user name>| head -1 (the first line: the last login) or whatever lines you need or as suggested: last -1 <username> which would be faster still... Here are some records: ant:/var/spool/cron/crontabs $ timex last|wc -l real 16.32 user 9.40 sys 1.55 182882 ant:/var/spool/cron/crontabs $ timex last vbe|head -1 vbe pts/1 Thu Jan 31 16:26 - 16:33 (00:06) real 0.42 user 0.19 sys 0.08 ant:/var/spool/cron/crontabs $ timex last -1 vbe vbe pts/1 Thu Jan 31 16:26 - 16:33 (00:06) real 0.03 user 0.01 sys 0.01 With 182882 records it replies (almost) instantly... No doubt last -1 name is the fatest... I suggest that you resize wtmp at something reasonable if it is giving you trouble... ( save a copy before for archive history... since you can use last specifying a filename also! great no?) If you have may users you want the information write a script that read the list of names All the best |
| Thread Tools | |
| Display Modes | |
|
|