LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-28-2009, 09:04 PM   #1
centguy
Member
 
Registered: Feb 2008
Posts: 627
Blog Entries: 1

Rep: Reputation: 48
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.
 
Old 07-29-2009, 01:57 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can run:
Code:
dumpe2fs -h /dev/<devicaname>
Replace <devicename> with your partition (hda1, sda2 etc)

Regards
 
Old 07-29-2009, 02:01 AM   #3
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
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
 
Old 08-03-2009, 08:19 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
&
Code:
dumpe2fs -h /dev/<devicaname>  | grep 'Last'
might winnow out stuff you aren't interested in.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(disk device) was not cleanly unmounted, check forced. How long? mpbro Linux - Newbie 10 06-16-2008 05:12 PM
Disk check takes too long to check hemantm Linux - Hardware 16 12-22-2006 04:18 AM
Boot disk; check. CD in drive; check. Doesn't work; check. Hal DamnSmallLinux 7 02-04-2004 02:10 AM
Hard drive mounted in read only (After long uptime...) otjervaag Linux - Laptop and Netbook 10 10-04-2003 08:34 PM
Check if it IS mounted sourceman Linux - General 11 02-27-2002 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration