Доработка скрипта для изменения размера файла подкачки
This commit is contained in:
6
swap_file_size_change.sh
Normal file → Executable file
6
swap_file_size_change.sh
Normal file → Executable file
@@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
if [ -e $1 ]
|
||||
then
|
||||
sudo swapoff $1
|
||||
sudo rm $1
|
||||
fi
|
||||
sudo touch $1
|
||||
sudo chmod 600 $1
|
||||
sudo fallocate -l $2 $1
|
||||
sudo mkswap $1
|
||||
sudo swapon $1
|
||||
Reference in New Issue
Block a user