You are not logged in.

#1 2009-12-05 21:54:51

tsr-nc
Member
Registered: 2009-02-07
Posts: 40

finding device node for mount point

how do i find a device node for a disk mounted by hal when i know the mount point
i need this for a script.

Offline

#2 2009-12-05 22:23:07

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: finding device node for mount point

What is the output of mount?  It should give the block device and mount point.  I would think you can grep/awk or sed the rest out to get what you want for the script.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2009-12-06 04:09:29

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: finding device node for mount point

cat /etc/mtab -or-
cat /etc/mtab | awk -v m=$MOUNTPOINT '{  if ($2 == m) print $1 }'

Offline

#4 2009-12-09 00:51:30

tsr-nc
Member
Registered: 2009-02-07
Posts: 40

Re: finding device node for mount point

Thank you thats just what i was looking for

Offline

Board footer

Powered by FluxBB