Log of mounted/unmounted devices in Unix
Apologies in advance for the basic question.
I need to identify the log of mounted/unmounted devices in Unix (including the timestamps when these actions where performed).
I noticed that using the mount command is not very helpful for this purpose, since there is no indication of the timestamps when the mount/unmount operations where performed. Can anyone indicate me a possible alternative?
Thank you in advance! :-)
Solution 1:
There is no such log.
You can sometimes identify when a filesystem was mounted by observing kernel logs, because some filesystem types will reliably log something in there each time a filesystem is mounted. But then again, some filesystem types won't. As for unmounting, I don't think you will find any logs at all.
The last modified time of /etc/mtab
(or /etc/mnttab
on some systems) will usually give a clue about the last time any mount or mount was performed, but that's about it.