Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
from dmesg we can know that particular device has been mounted or unmounted.
dmesg
But I want to know on which time the device has been mounted or unmounted.
Linux/var/logディレクトリには、さまざまなログの詳細が含まれています。このディレクトリから以前のログの履歴を取得することもできます。カーネルは、以前のログの詳細を圧縮します。あなたの場合は、開く必要がありますkern.log。しかし、 にない詳細を探している場合はkern.log、見ることができますkern.log.1。非常に古い詳細に興味がある場合は、解凍する必要があります。kern.log.2.gz
/var/log
kern.log
kern.log.1
kern.log.2.gz