Linux创建Swap分区

#!/bin/bash
SIZE=$1
PATH=$2
fallocate -l $SIZE $PATH
chmod 600 $PATH
mkswap $PATH
swapon $PATH
echo "$PATH     none    swap    sw      0       0" | tee -a /etc/fstab