Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Get Last Accessed File Time In Ubuntu Linux

Ubuntu Linux has a rich set of commands for manipulating and accessing files. The stat utility gives detailed access to file information, including last accessed and last modified file time.

From the terminal window, run the command with this syntax:

stat filename

Here's an example of checking the last time I've run Firefox on one of my machines:

[geek@ubuntu firefox]# stat firefox-bin
  File: `firefox-bin'
  Size: 9781136         Blocks: 19136      IO Block: 4096   Regular File
Device: 302h/770d       Inode: 555615      Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (  500/  geek)   Gid: (  500/  geek)
Access: 2006-01-14 17:41:15.000000000 -0500
Modify: 2005-05-11 14:17:00.000000000 -0400
Change: 2005-05-13 23:31:44.000000000 -0400

I guess I haven't used that box in a while… last time I used firefox was january 14th.

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 11/26/06 and tagged with: Ubuntu, Ubuntu Tips & Tweaks

Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.