Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-26-2009, 05:27 PM   #1
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
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
man last
       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
Old 03-26-2009, 05:43 PM   #3
LQ Newbie
Registered: Mar 2009
Posts: 5

Rep: Reputation: 0
Post last login info

last login information is stored in the files

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)

Old 04-16-2009, 04:33 PM   #4
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
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


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 > Forums > Linux Forums > Linux - Newbie

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

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