3

I've vimed a file, and only afterwards realised that I need the atime (last access time) for the file. Is there any way to recover the atime for a file after accessing it inadvertently?

The filesystem is mounted as so:

UUID=XXXX /home ext4 defaults 0 2 

I'm interested in a distro-neutral solution, however barring that I am currently using Ubuntu Server 12.04.

6
  • 3
    I wouldn't count on it, but you never know. What filesystem & mount options do you have? Commented Aug 20, 2014 at 8:20
  • Doing a cat file will not change the atime at all. You can check it using stat file If you used view file or vi file that would alter Access, Modify and Change attributes Commented Aug 20, 2014 at 9:23
  • @val0x00ff: I added the fstab options to the question. Commented Aug 20, 2014 at 9:37
  • @dotancohen The access time cannot be recovered. The system doesn't keep track of file access times. This is for a reason since auditing otherwise would be impossible Commented Aug 20, 2014 at 9:45
  • @val0x00ff: Thanks, val. I figured that was the answer, but I had to hear it from someone with more experience than me. I'll leave the question open if some neckbeard guru ever comes across it with an answer out of Mordor. Commented Aug 20, 2014 at 10:28

1 Answer 1

1

This is not possible. There is no history of previous atime values kept in memory by the system.

Well, to be completely honest, the previous atime value may exist somewhere on RAM or even on disk, but you wouldn't know where, nor for how long.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.