3

I found the answer to this question, but that only works for EXT* filesystems, there's an answer also for NFS (even though the question tagged ext4). However I'm using XFS so neither of the answers works for me.

There was a comment on the accepted answer that it only works for EXT* and it was suggested that one should ask a new question instead of commenting an old. So here's the new question: how do I find out the last time a XFS file system was mounted?

I'm using Ubuntu, but I think it shouldn't differ between distributions.

skyking
  • 168

1 Answers1

0

If your version of Ubuntu uses systemD you may be able to check systemD mount points. Example:

systemctl status var-log-audit.mount

<Snip>
Active: active (mounted) since Tue 2016-06-07 02:06:07 IST; 54s ago
Where: /var/log/audit
<Snip>

The timestamp should show the last mount, even if not performed with systemctl start var-log-audit.mount.

You could also use journalctl to examine the service unit for log history

journalctl -xe -U var-log-audit.mount