Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
|
informatique:linux:mount [2007/09/21 15:33] 127.0.0.1 édition externe |
informatique:linux:mount [2018/09/06 19:10] (Version actuelle) |
||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| zcat initrd.img > /home/initrd.out | zcat initrd.img > /home/initrd.out | ||
| mount -o loop /home/initrd.out /mnt/isolinux/ | mount -o loop /home/initrd.out /mnt/isolinux/ | ||
| + | |||
| + | === Utiliser la mémoire en tant que système de fichier === | ||
| + | |||
| + | mount -t tmpfs tmpfs /tmp | ||
| + | |||
| + | === Monter un répertoire dans un autre répertoire === | ||
| + | Exemple mon monter le répertoire /var/log/apache2/ dans /var/www/apache-log/ | ||
| + | |||
| + | mount --bind /var/log/apache2/ /var/www/apache-log/ | ||
| + | |||
| + | Ou pour le monter en lecture seule, deux commandes sont nécessaires : | ||
| + | |||
| + | mount --bind /var/log/apache2/ /var/www/apache-log/ | ||
| + | mount -o remount,ro,bind /var/www/apache-log/ | ||
| + | |||
| + | Syntaxe pour /etc/fstab | ||
| + | # Montage en ecriture : | ||
| + | /var/log/apache2/ /var/www/apache-log none bind 0 0 | ||
| + | | ||
| + | # En lecture seulement (monter 2 fois comme ci-dessous) : | ||
| + | /var/log/apache2/ /var/www/apache-log none bind 0 0 | ||
| + | /var/log/apache2/ /var/www/apache-log none bind,remount,ro 0 0 | ||