在 RedHat 上我可以这样做:
$ 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
但在 ubuntu 上并非如此:
$ 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
ubuntu 机器上也存在。我也想知道它指向什么,我该怎么做?
答案1
运行df /mnt/inf1/linux-www
以获取有关特定文件系统的信息。df
可以被告知忽略某些文件系统类型,请检查您(或您的系统管理员)是否没有别名df
为df -l
.也可以看看有没有命令可以查看磁盘挂载位置?