直接修改原本的目录暂时没找到办法,但可以通过挂载的方式在原有目录或新建目录改造
如:
[root@luozhonghua /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_luozhonghua-lv_root
21G 4.1G 16G 21% /
tmpfs 4.0K 4.0K 0 100% /dev/shm
/dev/sda1 485M 32M 428M 7% /boot
tmpfs 4.0K 4.0K 0 100% /dev/shm
修改:
[root@luozhonghua /]# mkdir /mnt/ram
[root@luozhonghua /]# mount -t tmpfs -o size=1024m tmpfs /mnt/ram
[root@luozhonghua /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_luozhonghua-lv_root
21G 4.1G 16G 21% /
tmpfs 4.0K 4.0K 0 100% /dev/shm
/dev/sda1 485M 32M 428M 7% /boot
tmpfs 4.0K 4.0K 0 100% /dev/shm
tmpfs 1.0G 0 1.0G 0% /mnt/ram
原文地址:http://blog.csdn.net/luozhonghua2014/article/details/39276443