Can I tell what time an application was last opened?

I was wondering if this was possible at the shell command...is there a log at the UNIX level of what time the last apps were opened?

Thanks,

sp

G5 Mac OS X (10.4.8)

Posted on Feb 1, 2007 2:51 AM

Reply
10 replies

Feb 1, 2007 3:49 AM in response to singaporekid

Not by default. The command lastcomm and sa lets you see, what and when.

Before you can use this, create with sudo mkdir /var/account an folder.
With sudo touch /var/account/acct make the logfile. And you start the accounting with sudo accton /var/account/acct. To disable it, use only accton. This is temporally.

lastcomm create a long list. For a better overview, you can use a pipe, e.g.
lastcomm | less.

Feb 1, 2007 3:56 PM in response to singaporekid

In addition to the standard creation and modification times, Mac OS X does record the last accessed time for a file. I don't know of any way to show this information in the Finder, but in the terminal you can run the ls command with the -u flag to show the last accessed time instead of the modified time. Running "ls -ul /Applications" will show you when the applications were last launched. You can pipe the results through grep to just show when Mail was last launched "ls -ul /Applications | grep Mail".

Michael

Mac Pro Mac OS X (10.4.8)

Feb 1, 2007 3:47 PM in response to singaporekid

If you don't trust other users that have access to your Mac, you should never give them access to your account.

Create a new non-admin account for guests to use, and never give out the password for your own user account. Set a screensaver password. When waking up the screen, your guests cannot get into your account but they can switch into the guest account.

You can also turn on FileVault to fully protect all of your data from snoopers.

Hope this helps.

Feb 1, 2007 3:32 PM in response to Jpfresno

Ultimately, I'm trying to see when Mail was opened in the last 24 hours or so (and how many times) because I believe my roommate is snooping--my "Last Application" pulldown menu has been cleared (among other things) so I'm trying to get to a log of some sort to see what's been happening while I'm away...

...and, yes, I've thought about logging in/out of the system as the Admin, but there is a reason why I'm not able to do that...

Thanks for the ideas...

-sp

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can I tell what time an application was last opened?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.