Quickly Grow tmpfs filesystem
Just a quick command to double the size of the /tmp
filesystem that uses tmpfs
. This is for those situations when you can’t be bothered to think.
df -hlP /tmp && (( s = `df -lP /tmp | grep ^tmpfs | awk '{print $2}'` * 2 *1024 )) && mount -o remount,size=${s} tmpfs /tmp && df -hlP /tmp
One thing to keep in mind, however, is that tmpfs
is stored in volatile memory – sort of like a RAM disk – so it can pretend to be as big as you want it, but it can’t really hold more data than the available RAM.