In linux, the/dev/shm system loads/dev/shm by default. it is called tmpfs. some people say it is different from ramdisk (virtual disk. Like a virtual disk, tmpfs can use your RAM, but it can also use your swap partition for storage. And traditional virtual magnetic...
In linux, the/dev/shm system loads/dev/shm by default. it is called tmpfs. some people say it is different from ramdisk (virtual disk. Like a virtual disk, tmpfs can use your RAM, but it can also use your swap partition for storage. In addition, a traditional virtual disk is a block device and requires commands such as mkfs to actually use it. tmpfs is a file system, not a block device. you only need to install it, it can be used. Www.2cto.com tmpfs has the following advantages: 1. the size of the dynamic file system. 2. another major benefit of tmpfs is its lightning speed. Because the typical tmpfs file system will completely reside in RAM, reading and writing can be almost instantaneous. 3. tmpfs data will not be retained after restart, because the virtual memory is essentially easy to lose. Therefore, it is necessary to execute some scripts such as loading and binding. Let's talk about the application. First, create a tmp folder in/dev/stm, then bind mkdir/dev/shm/tmp www.2cto.com chmod 1777/dev/shm/tmp mount -- bind/dev/shm/tmp (-- bind) to the actual/tmp) after you use the mount -- bind olderdir newerdir command to mount a directory to another directory, the newerdir permission and owner information will change. The mounted directory inherits all the attributes of the mounted directory except the name.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.