Skip to content

Instantly share code, notes, and snippets.

@kissarat
Last active February 4, 2019 16:11
Show Gist options
  • Save kissarat/f75df98ecc00f3becb7f14d6e39f9ee4 to your computer and use it in GitHub Desktop.
Save kissarat/f75df98ecc00f3becb7f14d6e39f9ee4 to your computer and use it in GitHub Desktop.
FILENAME=/tmp/swap-$(date +%s)
dd if=/dev/zero of=${FILENAME} bs=1M count=$1
mkswap ${FILENAME}
chmod 600 ${FILENAME}
swapon ${FILENAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment