Extended Last Release 1.0
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > Extended Last Release 1.0




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Extended Last Release 1.0  
Matty


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-23-04 03:27 AM

Hello,

I posted to comp.unix.solaris a while back asking if it was possible to
print all 32-characters of a users ut_user field in a utmpx structure.
The feedback seemed to indicate that this was not possible, so I wrote
the extended last:

http://www.daemons.net/~matty/code/lastx.c

In addition to printing all 32-characters of the username, it also
allows you to print the users who have logged in within the past
X days. You can also pass the "-u" option to lastx to have it print
the the number of times a user has logged in, along with the last time
they logged in:

./lastx -d 10 -u
Username             Logins  Terminal   Host                 Last Logged in
matty                    45  pts/5      192.168.1.8          Sat May 22 09:3
5:09 2004
clay                      1  pts/5      192.168.1.8          Sat May 2209:35
:19 2004

The code is not the prettiest, but it seems to work ok. If you have
recommendations or feedback, I would love to hear it.

Hope folks find this useful. 
- Ryan





[ Post a follow-up to this message ]



    Re: Extended Last Release 1.0  
Roland Mainz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-24-04 04:30 AM

Matty wrote:
> I posted to comp.unix.solaris a while back asking if it was possible to
> print all 32-characters of a users ut_user field in a utmpx structure.
> The feedback seemed to indicate that this was not possible, so I wrote
> the extended last:
>
> http://www.daemons.net/~matty/code/lastx.c

Does the tool work in UTF-8 locales, too ?

----

Bye,
Roland

--
__ .  . __
(o.\ \/ /.o) roland.mainz@nrubsig.org
\__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\  TEL +49 641 7950090
(;O/ \/ \O;)





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:54 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register