Skip to content

Instantly share code, notes, and snippets.

@nddipiazza
Last active July 12, 2019 02:46
Show Gist options
  • Select an option

  • Save nddipiazza/b4fb87568deadb08871b1d1a604d8df5 to your computer and use it in GitHub Desktop.

Select an option

Save nddipiazza/b4fb87568deadb08871b1d1a604d8df5 to your computer and use it in GitHub Desktop.
#!/bin/bash
out_dir="/home/ndipiazza/test-files/lots_of_small_text_files"
mkdir -p "$out_dir"
num_folders=10
num_files_in_folders=1000
for i in $(seq 1 $num_folders)
do
mkdir "$out_dir/$i"
for j in $(seq 1 $num_files_in_folders)
do
echo "file $i/$j" > "$out_dir/$i/$j.txt"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment