|
发表于 2003-10-16 00:07:23
|
显示全部楼层
最初由 lordbyorn 发表
df quite good.
df | grep hda1
:thank
lordbyorn兄的方法和我的比较 ;)以检测/dev/shm分区为例:- [/root]cat /etc/mtab
- /dev/hda2 / ext3 rw 0 0
- none /proc proc rw 0 0
- usbdevfs /proc/bus/usb usbdevfs rw 0 0
- /dev/hda1 /boot ext3 rw 0 0
- none /dev/pts devpts rw,gid=5,mode=620 0 0
- [/root]mount /dev/shm
- [/root]df
- Filesystem 1K-blocks Used Available Use% Mounted on
- /dev/hda2 37848096 1679224 34246296 5% /
- /dev/hda1 101089 9180 86690 10% /boot
- none 126168 0 126168 0% /dev/shm
- [/root]cat /etc/mtab
- /dev/hda2 / ext3 rw 0 0
- none /proc proc rw 0 0
- usbdevfs /proc/bus/usb usbdevfs rw 0 0
- /dev/hda1 /boot ext3 rw 0 0
- none /dev/pts devpts rw,gid=5,mode=620 0 0
- none /dev/shm tmpfs rw 0 0
- [/root]if cat /etc/mtab|grep shm >/dev/null;then echo YES;else echo NO;fi
- YES
- [/root]if df|grep shm >/dev/null;then echo YES;else echo NO;fi
- YES
- [/root]umount /dev/shm
- [/root]if df|grep shm >/dev/null;then echo YES;else echo NO;fi
- NO
- [/root]if cat /etc/mtab|grep shm >/dev/null;then echo YES;else echo NO;fi
- NO
- [/root]
复制代码 效果一样! |
|