# Root directory has only tool dir in it. expect tool dir / # Create a file. write /test contents # Directory shows it. expect test expect tool dir / # Make a new directory, check it's there mkdir /dir expect dir expect test expect tool dir / # Check it's empty. dir /dir # Create a file, check it exists. write /dir/test2 contents2 expect test2 dir /dir expect contents2 read /dir/test2 # Creating dir over the top should succeed. mkdir /dir mkdir /dir/test2 # Mkdir implicitly creates directories. mkdir /dir/1/2/3/4 expect test2 expect 1 dir /dir expect 2 dir /dir/1 expect 3 dir /dir/1/2 expect 4 dir /dir/1/2/3 dir /dir/1/2/3/4