How do I detect that a jump drive is mounted?

Knute Johnson knute2009 at knutejohnson.com
Sat Aug 29 03:23:47 UTC 2009


Fred Roller wrote:
> On Fri, 2009-08-28 at 15:18 -0700, Knute Johnson wrote:
>> I've got a jump drive that I use to back up some files at night.  Is 
>> there a simple way in a script that I can check to see that the drive is 
>> mounted?
>>
>> Thanks,
>>
>> -- 
>>
>> Knute Johnson
>>
>>
> 
> A better option may be to have the script run your backup when the jump
> drive is inserted.  Found this article on someone doing similar for
> their back up scenario.
> 
> http://ubuntuforums.org/showthread.php?t=904522
> 
> In the first suggestion using the "rules" I personallyhad some success
> but was trying things with vmware at the time.
> 
> the second suggestion, the one the OP used, seems to be the best fit for
> your situation.  You could also search 
> 	"ubuntu run script on usb insert" 
> which yielded a number of options.  Hope it's helpful.

Thanks for the response.  I'm leaving the jump drive plugged in all the 
time so that's not a great option for me.  Secondly I'm running the 
server version so it doesn't automatically mount jump drives.  On second 
thought, how does that automatic mounting work?  Is there a program I 
could install that would automount it?

-- 

Knute Johnson





More information about the ubuntu-users mailing list