| | |
Last login from <ip address>
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
You would have seen this message when you telnet to an unix machine, it displays
last login from <ip address> message
What is the sytem command for displaying the same ? Can I code it in C++ without using system command ?
last login from <ip address> message
What is the sytem command for displaying the same ? Can I code it in C++ without using system command ?
Hey,
There is a lastlog command in unix that displays the contents of the /var/log/lastlog file, This is a binary file and a structure describing the contents is located in the <bits/utmp.h> header file
anyhow more useful is prolly this example of a lastlog editor written in C that can be found here
There is a lastlog command in unix that displays the contents of the /var/log/lastlog file, This is a binary file and a structure describing the contents is located in the <bits/utmp.h> header file
•
•
•
•
struct lastlog
{
#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32
int32_t ll_time;
#else
__time_t ll_time;
#endif
char ll_line[UT_LINESIZE];
char ll_host[UT_HOSTSIZE];
};
![]() |
Similar Threads
- Updated : Simple ASP.Net Login Page (ASP.NET)
- locating remote machine name (VB.NET)
- Hotmail Login Problem! (Web Browsers)
- Can ping web IP address but cannot get on the Internet (Networking Hardware Configuration)
- Problems login Hotmail (Web Browsers)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- ftp login (Web Browsers)
- PHP Query, Make users login before accessing a movie? (PHP)
- php help needed for login (PHP)
Other Threads in the C++ Forum
- Previous Thread: How to include header files in Visual C++
- Next Thread: handle on window
| Thread Tools | Search this Thread |
api array arrays based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






