You could replace the numerical parts of the sequential filenames with #s, using a sed expression (similar to the second one in Freddy's answer). uniq can then remove the duplicate lines:
tree | sed 's/\.[0-9]\+\.jpg/.####.jpg/g' | uniq This will still leave two entries for the images (because the final line uses a different symbol in the tree-drawing part), but it has still trimmed the list down to a manageable length:
. |-- directory1 | `-- image_sequence | |-- image.####.jpg | `-- image.####.jpg `-- directory2 |-- someanotherfile.ext2 `-- somefile.ext