Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

urgent help needed

Status
Not open for further replies.

terminalfrost

Programmer
Oct 11, 2003
3
CA
how to write my own code for the command "who" in unix
 
You mean write code that would do the same thing that who does? Why would you need to do that when it is already part of just about all (if not all) flavors of Unix? Sort of like reinventing the wheel, isn't it?
 
well you are soo rite.....its like i need to know how to do it..i know i have to open the utmpx file and read the structure..but i dont know how to implement..it..i am trying this for hours..but no luck..so if you can help me with this..i would appriciate it
 
What have you tried?

Have you included utmp.h and/or utmpx.h and used the struct utmp(x) to read the records into?

There are a whole suite of functions designed to read from these databases. See man getutxent for example.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top