Script para llenar un FS (JFS2)
#!/bin/ksh93
# Creates small files (1 block, 1/2 Kb) until it depletes the $1 mount point
dir=${1:="/test512"}
[ "${dir}" = "$(df ${dir} 2>/dev/null | awk 'NR>1 {print $NF}')" ] \
|| { echo "Error: ${dir} is not a mount point" 1>&2; exit 1; }
trap 'tput rmso; print; print ; df ${dir}' EXIT
tput smso
for ((i=0; 1==1; i++))
do
tput sc
dd if=/dev/zero of=/${dir}/file-${i} count=1 2> /dev/null || break
printf "%06d" ${i}
tput rc
done
Comments