Tmpfs
De Linuxmemo.
(Différences entre les versions)
(→Astuce) |
|||
| (Une version intermédiaire masquée) | |||
| Ligne 13 : | Ligne 13 : | ||
==Astuce== | ==Astuce== | ||
mytmpfs () { | mytmpfs () { | ||
| - | + | if (! $( mount| grep -q mytmpfs)) | |
| - | + | then | |
| - | + | mount -t tmpfs -o size=5M tmpfs /mnt/mytmpfs | |
| - | + | fi | |
} | } | ||
| + | mytmpfs | ||
Version actuelle en date du 23 octobre 2018 à 13:51
[modifier] tmpfs, un repertoire en memoire ram
mkdir /mnt/mytmpfs chmod 777 /mnt/mytmpfs mount -t tmpfs -o size=5M tmpfs /mnt/mytmpfs Ou dans /etc/fstab : tmpfs /mnt/mytmpfs tmpfs defaults,size=5m 0 0
[modifier] Astuce
mytmpfs () {
if (! $( mount| grep -q mytmpfs))
then
mount -t tmpfs -o size=5M tmpfs /mnt/mytmpfs
fi
}
mytmpfs