LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   check how long a disk has been mounted (https://www.linuxquestions.org/questions/linux-software-2/check-how-long-a-disk-has-been-mounted-743545/)

centguy 07-28-2009 09:04 PM

check how long a disk has been mounted
 
Can i find out when (i.e., the exact time) a disk last mounted to the system ? This way I may be able to figure out if somehow has unplugged my external drive and replug in later.

bathory 07-29-2009 01:57 AM

You can run:
Code:

dumpe2fs -h /dev/<devicaname>
Replace <devicename> with your partition (hda1, sda2 etc)

Regards

jdkaye 07-29-2009 02:01 AM

Quote:

Originally Posted by bathory (Post 3623854)
You can run:
Code:

dumpe2fs -h /dev/<devicaname>
Replace <devicename> with your partition (hda1, sda2 etc)

Regards

And it needs to be run as root.
jdk

archtoad6 08-03-2009 08:19 AM

&
Code:

dumpe2fs -h /dev/<devicaname>  | grep 'Last'
might winnow out stuff you aren't interested in.


All times are GMT -5. The time now is 08:11 PM.