Atime: Difference between revisions

From Hackepedia
Jump to navigationJump to search
Frankk (talk | contribs)
No edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Time of last access of a file, the information is taken from the [[inode]], only if the [[filesystem]] doesn't have the noatime option.
Time of last access of a file, the information is taken from the [[inode]], only if the [[filesystem]] doesn't have the noatime option.


  $ stat -s [[variables|$disk]] | tr ' ' '\n' | grep atime
  $ stat -s [[variables|$file]] | tr ' ' '\n' | grep atime
  st_atime=1130490958
  st_atime=1130490958
  $ date -r 1130490958
  $ date -r 1130490958
  Fri Oct 28 11:15:58 CEST 2005
  Fri Oct 28 11:15:58 CEST 2005
  $ ls -luT disk
  $ ls -luT [[variables|$file]]
  -rw-r--r--  1 root  wheel  33554432 Oct 28 11:15:58 2005 disk
  -rw-r--r--  1 root  wheel  33554432 Oct 28 11:15:58 2005 file


It can be helpful reading the atime of a script to see when it was last run.  Perhaps an rc script to see when a service was started/stoppped/restarted.
It can be helpful reading the atime of a script to see when it was last run.  Perhaps an rc script to see when a service was started/stoppped/restarted.

Latest revision as of 12:58, 28 October 2005

Time of last access of a file, the information is taken from the inode, only if the filesystem doesn't have the noatime option.

$ stat -s $file | tr ' ' '\n' | grep atime
st_atime=1130490958
$ date -r 1130490958
Fri Oct 28 11:15:58 CEST 2005
$ ls -luT $file
-rw-r--r--  1 root  wheel  33554432 Oct 28 11:15:58 2005 file

It can be helpful reading the atime of a script to see when it was last run. Perhaps an rc script to see when a service was started/stoppped/restarted.