Take the 2-minute tour ×  I'm mounting a truecrypt container via
the command line (i.e. truecrypt file dir). Is there any way to
have truecrypt automatically unmount the container after a given
amount of inactivity in dir?  share|improve this question That's
a job for an automounter. Last time I used one on Linux, they
kind of sucked, but I think they've improved in the last decade.
–  Gilles Sep 5 '12 at 22:25 @Gilles Thanks for pointing it out,
I'll try and find one for this –  Tobias Kienzler Sep 6 '12 at
6:04 Can truecrypt be mounted with the mount command? –  Nils
Sep 6 '12 at 21:24 Could you perhaps use something similar to
@ultrasawblade's script and leverage lsof (or possibly
/proc/*/fd or somesuch; lsof gets its data from somewhere...)?
It wouldn't be perfect (very fast accesses would go uncaught,
and it would cause a bit of CPU hammering), but I'm guessing
it's either something like that, or access notifies (which at
the very least means write a system application, not a script).
–  Michael Kjörling