Question : Find /dev/ location of a mount point in bash script

I have /dev/sdk mounted to /web
However I have a script that only knows about /web and it needs to find where /web is mounted from (which would be /dev/sdk).

Is there an easy way to find the /dev/ location of a mount point?

Answer : Find /dev/ location of a mount point in bash script

df /web  | grep -v Filesystem | cut -f1 -d" "
Random Solutions  
 
programming4us programming4us