The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
wtmp file lo-lp-kl AIX 4 06-02-2008 10:32 AM
WTMP file cleared after upgrade zuessh AIX 2 03-07-2008 09:47 AM
displaying mutliple fields on command line Trellot UNIX for Dummies Questions & Answers 3 11-02-2007 04:37 AM
displaying the last line of the file lmadhuri UNIX for Dummies Questions & Answers 8 02-21-2007 03:07 AM
manage the wtmp file me2unix UNIX for Dummies Questions & Answers 0 12-18-2000 04:09 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 06-26-2004
Registered User
 

Join Date: Jun 2004
Posts: 4
Displaying fields in wtmp file?

Anyone have any idea on how to display the fields for each record stored in the wtmp file using C? Am I correct in thinking that the info stored in wtmp is in binary and that utmpx will be of some help? Being a beginner, I can come up with bits and pieces of what I might need in order to do the task, but have a harder time putting all the pieces together to form working code. I am assuming I need to include these bits of code:

#include <utmp.h>
#include <utmpx.h>

struct utmpx record;
fread(&record, sizeof(record), ???)

printf(??????)

Any assistance would be greatly appreciated. Thanks.
Reply With Quote
Forum Sponsor
  #2  
Old 06-26-2004
Registered User
 

Join Date: Jun 2004
Posts: 4
Fantastic Driver!!! Thank you very much.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:18 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0