#!/bin/sh # Create a disk image containing some (text) data. if [ $# -eq 0 ] then echo "Fill disk of some capacity (in ~1 MB units) from stdin" echo "usage: image-data capacity" exit 1 fi dd if=/dev/zero of=data.img count=$(($1*2016)) # 32 tracks * 63 sectors/track of 512-byte sectors dd of=data.img conv=notrunc