# dd if=/dev/zero of=/swap.dat bs=1024 count=512M
should be 512k, thanks
More information about text formats
# dd if=/dev/zero of=/swap
# dd if=/dev/zero of=/swap.dat bs=1024 count=512M
should be 512k, thanks