LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-26-2009, 05:27 PM   #1
scream
Member
 
Registered: Feb 2008
Distribution: Oracle Linux
Posts: 32

Rep: Reputation: 0
last login information


which log file stores last login information?
 
Old 03-26-2009, 05:42 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
man last
Code:
DESCRIPTION
       Last searches back through the file /var/log/wtmp (or the  file  desig‐
       nated  by  the -f flag) and displays a list of all users logged in (and
       out) since that file was created.  Names of  users  and  tty’s  can  be
       given,  in  which  case  last will show only those entries matching the
       arguments.
 
Old 03-26-2009, 05:43 PM   #3
eascown3
LQ Newbie
 
Registered: Mar 2009
Posts: 5

Rep: Reputation: 0
Post last login info

last login information is stored in the files
/var/log/wtmpx
/var/log/utmpx

you extract the information you need with the "last" command.

last # by itself shows ALL logins

last user # shows logins by "user"

last boot # shows times of last reboot(s)


Cheers!
 
Old 04-16-2009, 04:33 PM   #4
craigorymaas
LQ Newbie
 
Registered: Mar 2009
Posts: 9

Rep: Reputation: 0
Is there a way to get this information inside of a c file? (or c++)
I want to get the very first login stored.
 
Old 04-16-2009, 05:00 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
man getutline
?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu login information s3rro Ubuntu 1 03-21-2009 12:17 PM
login information sharma.kashyap Linux - Security 1 07-17-2006 06:07 AM
Prompt user for information immediately after login? bpottle Linux - Software 1 05-31-2006 09:59 AM
how can i display a information for all users when they login? lnthai2002 Linux - General 1 02-21-2006 07:04 PM
gather login information gsanand Programming 0 10-21-2004 06:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration