Created
February 12, 2021 00:19
-
-
Save feilongfl/3c3bd21395468f5e7d26a6d1ba9eeffd to your computer and use it in GitHub Desktop.
linux swap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
set swap_file /home/feilong/Program-ext/swap/swapfile | |
fallocate -l 100G $swap_file | |
chmod 600 $swap_file | |
mkswap $swap_file | |
swapon $swap_file | |
# swapoff -v $swap_file | |
# rm $swap_file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
set swap_file /home/feilong/Program-ext/swap/swapfile | |
# fallocate -l 100G $swap_file | |
# chmod 600 $swap_file | |
# mkswap $swap_file | |
# swapon $swap_file | |
swapoff -v $swap_file | |
rm $swap_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment