[Techtalk] checking mounts
Miriam English
mim at miriam-english.org
Sun Sep 27 01:08:38 UTC 2009
Hi Joana,
Damn! I knew about mtab, yet I spent hours trying various other things.
Amazing how the human mind can get tunnel-vision. :)
It occurs to me that mtab could be prone to the same name problems as
those that Sarah pointed out for the mount command in her reply.
Thanks Joana.
- Miriam
Joana Botto wrote:
> Hi Miriam,
>
> What I usually do to see the mounted partitions is to type mount at
> the command prompt or cat /etc/mtab.
>
> So, to check if sdb is mounted:
> $ grep sdb1 /etc/mtab
>
> If there is no output it's not mounted.
>
> Regards,
> Joana Botto
>
> On Sat, Sep 26, 2009 at 8:33 AM, Miriam English <mim at miriam-english.org> wrote:
>> Hi folks,
>>
>> I want to make a shell script check whether a device is mounted or not.
>>
>> Anyone know how to do this? There has to be a way...
>>
>> It is not terribly important, just a script for myself to make my own
>> life easier, but it is starting to really bug me and if I don't ask
>> someone I just know I'll end up wasting hours and hours looking for the
>> stupid thing. :)
>>
>> Thanks,
>>
>> - Miriam
>>
>> --
>> If you don't have any failures then you're not trying hard enough.
>> - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
>> -----
>> Website: http://miriam-english.org
>> Blog: http://miriam_e.livejournal.com
>> _______________________________________________
>> Techtalk mailing list
>> Techtalk at linuxchix.org
>> http://mailman.linuxchix.org/mailman/listinfo/techtalk
>>
>
>
--
If you don't have any failures then you're not trying hard enough.
- Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
-----
Website: http://miriam-english.org
Blog: http://miriam_e.livejournal.com
More information about the Techtalk
mailing list