Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.

AppleCare can also provide you details if you give them your serial number. They have manufacture date, sale date (sometimes inaccurate) and possibly if the user runs the "Mac Buddy" setup assistant and registers the Mac online during the first boot.

share|improve this answer
1  
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

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
    
Why do you ignore the data of System key and trust the other dates? – bmike Nov 15 '15 at 19:07
    
In my case Systemkey is older than the manufacturing date of the computer. And the timestamp of the other files match the date I've upgrade to El Capitan. Hmm. – patrix Nov 16 '15 at 19:03

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.