#!/bin/bash ## test filenames of different lengths 1..255 ## the first part is bash-specific and not portable to ## (eg sco & xenix) other shells w/o research ## the real goal here is to build a tar file which can be ## extracted to a filesystem under test, and the results ## tar'd back up again to compare off-box with 'diff -r', ## checking for mis-named files or corruption ## don't be surprised if 'tar vtz' has names out of order, ## just make sure they're all created ## still haven't had time to look at code, i recall 255 being the ## E(A)FS filename limit. adjust if necessary. mkdir sco-test max=255 n=1; while [ $n -le $max ] do name=$(printf "%0${n}d" $n) echo $name > sco-test/$name let n++ done tar czf sco-test.tgz sco-test rm -rf sco-test