fajlrendszerek
Tartalomjegyzék
fstab
A /etc/fstab fájlban vannak a boot során felmountolandó fájlrendszerek. Ha egy bejegyzés hibás, akkor lehet, hogy nem indul el a gép. Emiatt érdemes használni az alábbi parancsot:
mount -fav
The above command will help if you don’t want to apply the modifications in the fstab and want to validate the entries only. This will just fake the entries in the fstab without applying the changes. This is a very useful command.
swap
Swapfile készítése
# root felhasználóként létrehozunk egy pl. 2GB-os fájlt pl a /my/swapfile helyen: $ dd if=/dev/zero of=/my/swapfile bs=1024 count=2097152 # beállítjuk, hogy csak a root férjen hozzá $ chmod 600 /my/swapfile # kialakítjuk a swapfájlt $ mkswap /my/swapfile # bekapcsoljuk, hogy használja is a rendszer: $ swapon /my/swapfile # beírjuk az fstabba: $ vim /etc/fstab # /my/swapfile none swap sw 0 0
SSHFS
Example:
apt install sshfs sudo sshfs -o allow_other,defer_permissions,IdentityFile=~/.ssh/id_rsa root@xxx.xxx.xxx.xxx:/ /mnt/droplet
SSHFS does not use .ssh/config.
Törölt fájl, amit még fog valamilyen process
$ lsof | grep myfile less 4158 jimbo 4r REG 3,65 114383 1276722 /home/jimbo/myfile (deleted) $ cp /proc/4158/fd/4 myfile.saved
fajlrendszerek.txt · Utolsó módosítás: 2022/02/08 11:08 szerkesztette: daevidt
