Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is it possible to read the date when a mac first booted via terminal or system information GUI? Maybe there's a file set at this moment.

share|improve this question
add comment

2 Answers 2

The file /private/var/db/.AppleSetupDone is created on the first boot. I'd bet it doesn't get migrated over from an old mac if you choose that, so it might be a good place to start your search for a file stamp.

Any file can be changed later, but you have to go looking for this one.

share|improve this answer
    
I've updated from Leopard -> Snow Leopard -> Lion in my case. A ls -hla of /private/var/db/.AppleSetupDone shows the date of the last OS update. There are other files in the folder which show the possible answer but I'm not sure which to trust. There's even a file with a date before the manufacturing period :O –  Dali Jul 27 '11 at 19:06
    
Bummer - that was the best place I could think of. I suppose I would fire up a find command on a mac I already knew the first service date and find some files around then - and work backwards to see if it was reliable on other macs with unknown birthdays. –  bmike Jul 27 '11 at 20:12
    
Nevertheless thank you for your answer. I think a ls -lt | tail -10 which shows drwx------ 8 root wheel 272 Apr 18 2009 krb5kdc drwx------ 3 root wheel 102 Apr 18 2009 dhcpclient -r-------- 1 root wheel 48 Jan 14 2009 SystemKey is pretty reliable except the "SystemKey" file. –  Dali Jul 28 '11 at 9:18
    
Dali - feel free to make another answer with the real file that worked for you or editing my answer to make it better! Comments are great, but can get hidden later down the line. I'm glad something there worked for your query. –  bmike Jul 28 '11 at 12:10
    
I see. I'll do. Thanks! –  Dali Jul 28 '11 at 14:43
add comment

The closest answer to my problem could be:

ls -lt /private/var/db/ | tail -3

which shows for example:

drwx------ 8 root wheel 272 Apr 18 2009 krb5kdc
drwx------ 3 root wheel 102 Apr 18 2009 dhcpclient
-r-------- 1 root wheel 48 Jan 14 2009 SystemKey

Ignoring the date of the "SystemKey"-file.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.