
在 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
.也可以看看有沒有指令可以查看磁碟掛載位置?