Monday, November 18, 2013

How to make the tmp file system volatile


mount -t tmpfs -o size=65536 tmpfs /tmp
With size restricted /tmp dir created .
 For this you need enable temp file system in Linux kernel.

 mount -t tmpfs -o size=$((192 * 1024)) tmpfs /var

 For example in nfs create a temporary fs to hold core files alone:

 #update the core file pattern
echo "/var/core/core.%e.%p" > /proc/sys/kernel/core_pattern
mkdir -p /var/core
mount -t tmpfs -o size=$((32 * 1024)) tmpfs /var/core

No comments: