You are not logged in.

#1 2008-11-13 23:22:33

B-Con
Member
From: Frisco, TX
Registered: 2007-12-17
Posts: 549
Website

Determine last access of a filesystem?

I have a filesystem that I'd like to unmount if it goes unused for X amount of time. Is there a clean(ish) way to determine how long its been since a filesystem was last accessed?

I've written a script that simply lists all files on the file system, sorts by last accessed date, and compares that with the current date. It works, but I figure there has to be a more elegant solution. Plus this won't be practical if the filesystem grows substantially in size, or if the filesystem is mounted with the option noatime.


- "Cryptographically secure linear feedback based shift registers" -- a phrase that'll get any party started.
- My AUR packages.
- I use i3 on my i7.

Offline

Board footer

Powered by FluxBB