LinuxQuestions.org
Review your favorite Linux distribution.
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 05-11-2009, 07:33 AM   #1
just a man
Member
 
Registered: Feb 2009
Posts: 37

Rep: Reputation: 15
Veiwing log files


Hi all.

I'm trying to review log files, to see who previously accessed my server, and what commands were run. However when I try using nano, cat or vi to read /var/log/wtmp, just gobbledegook comes up.

I'm not actually expecting to find anything suspicious I just want to know how to do it, so I have tried to read this file on a Ubuntu machine as well as a Gentoo one, but the same problem happens for both, I can't read dmesg either. Are these files only available using a command or can I just veiw them as text files using nano for instance?
 
Old 05-11-2009, 07:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
it's a binary file read by "last".
 
Old 05-11-2009, 08:41 AM   #3
just a man
Member
 
Registered: Feb 2009
Posts: 37

Original Poster
Rep: Reputation: 15
Hm,

Quote:
$ last /var/log/wtmp

wtmp begins Fri May 1 15:46:25 2009
 
Old 05-11-2009, 09:04 AM   #4
just a man
Member
 
Registered: Feb 2009
Posts: 37

Original Poster
Rep: Reputation: 15
Is there a way to see a chronological list of previous logins instead of just the last one?
 
Old 05-11-2009, 09:23 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Use the last command alone (you have not to give the wtmp file as argument, since last will read it automatically):
Code:
last
 
Old 05-11-2009, 09:32 AM   #6
just a man
Member
 
Registered: Feb 2009
Posts: 37

Original Poster
Rep: Reputation: 15
Vielen Dank.
 
  


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
Firewall log file, how to make several different log files with IPTables? newtovanilla Linux - Newbie 5 11-28-2008 01:39 PM
vsftpd and log files - can i up the log level to see login attempts? robr Linux - Newbie 3 04-04-2008 12:38 PM
TV veiwing dobdd General 1 06-17-2005 11:12 PM
veiwing files in windows while on Linux (fedora) suresh_reddy Linux - Software 3 03-08-2004 04:46 PM
Can log files be time stamped? (such as FTP login and transfer log files) bripage Linux - Networking 6 08-08-2002 11:55 PM


All times are GMT -5. The time now is 10:37 PM.

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