How to check mnt location

filesystems

On RedHat I'm able to do this:

$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/xvda1             8256952   1820752   6352340  23% /
tmpfs                   305624         0    305624   0% /dev/shm
//10.128.41.24/linux-www
                     125826044 125826044         0 100% /mnt/inf1/linux-www

but on ubuntu not so:

$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1             15481840   3958456  10736952  27% /
none                    296028       108    295920   1% /dev
none                    303244         0    303244   0% /dev/shm
none                    303244        64    303180   1% /var/run
none                    303244         0    303244   0% /var/lock

$ df /mnt/inf1/linux-www
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1             15481840   3958612  10736796  27% /

$ mount
/dev/sda1 on / type ext4 (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)

$ awk -v needle="$device_path" '$1==needle {print $2}' /proc/mounts
[nothing]

$ grep /dev/sda /etc/mtab
[nothing]

**OH! It's because it's a folder! Sneaky!**

/mnt/inf1 exists on the ubuntu machine too. I'd like to know what it's pointing too, how do I go about doing that?

Best Answer

Run df /mnt/inf1/linux-www to get the information about a specific filesystem. df can be told to ignore some filesystem types, check that you (or your system administrator) haven't aliased df to something like df -l. See also Is there a command to see where a disk is mounted?

Related Question