Skip to content

Instantly share code, notes, and snippets.

@q7r
q7r / swap.sh
Last active December 30, 2016 08:41 — forked from peterchester/swap.sh
A simple little shell script that executes the digital ocean swap file tutorial.
#/bin/sh
if [ -f /swapfile ]; then
echo "Swap file already exists."
else
dd if=/dev/zero of=/swapfile bs=1024k count=2000
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile