You are not logged in.

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

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
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.

Offline

Board footer

Powered by FluxBB