#!/bin/bash

set -x

while [ true ]; do
	DIR=/home/dummydir
	for i in {1..50}
	do
		DIR="$DIR/dir${i}/"
		mkdir -p "$DIR"
		dd if=/dev/urandom of=$DIR/dummy bs=1KB count=1024
		mv $DIR/dummy $DIR/dummy.old
		tail -f $DIR/dummy.old > /dev/null 2>&1 &
		rm -f $DIR/dummy.old
		sync
	done
	rm -r /home/dummydir
	sync
done
