Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

renzocataldo

macrumors newbie
Original poster
Jun 30, 2016
2
0
Scottsdale
Hi everybody,
I would like to know the details of the login activity of my imac. I tried going into Applications/Utilities/Console. I looked at system.log but it only gave me info for today. Possibly very naiive question. If I run a disk utility/first aid, will the system.log be erased? If so, retrievable?
thanks
Renzo
 
Hi everybody,
I would like to know the details of the login activity of my imac. I tried going into Applications/Utilities/Console. I looked at system.log but it only gave me info for today. Possibly very naiive question. If I run a disk utility/first aid, will the system.log be erased? If so, retrievable?
thanks
Renzo

the logs are stored in the folder /var/log/ and there is a logrotate process that compress the current log and rename it, this also create a new log file. My system.log get rotated every 2 days on my macbook.

You should see :
Code:
system.log
system.log.0.gz   
system.log.1.gz 
system.log.2.gz 
system.log.3.gz

system.log is the current one, then .0.gz and the oldest one is your biggest number. Your system will keep X amount of each log but there will be a rotation, so you may have up to a week or more of data.

if you grab a copy of your logs files, you could uncompress them in another folder and inspect the log
 
I think you forgot 'n'
Code:
last -n 50
No, I didn't. I made the same mistake. I admit the man page for OS X version 10.9 might seem confusing but it clearly states -n Limits the report to n lines. Notice that the -n isn't bold.

Code:
Billys-Mac-Pro:~ kryten$ last -n20
last: illegal option -- n
usage: last [-#] [-t tty] [-h hostname] [user ...]

Note : I'm using Mavericks.
 
No, I didn't. I made the same mistake. I admit the man page for OS X version 10.9 might seem confusing but it clearly states -n Limits the report to n lines. Notice that the -n isn't bold.

Code:
Billys-Mac-Pro:~ kryten$ last -n20
last: illegal option -- n
usage: last [-#] [-t tty] [-h hostname] [user ...]

Note : I'm using Mavericks.

ok.. I checked the linux version and the -n was required. There also a ton of other arguments for
linux. Well the -n limit the lines like OSX but you can specify a date with:

-s, --since time

:)

again, this is linux, do not attempt on OSX! :rolleyes::p
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.