Getting ready

Besides having a terminal open, let's create some test data:

$ mkdir -p parentdir/child_with_kids$ mkdir -p parentdir/second_child_with_kids$ mkdir -p parentdir/child_with_kids/grand_kid/$ touch parentdir/child.txt parentdir/child_with_kids/child.txt parentdir/child_with_kids/grand_kid/gkid1.txt$ touch parentdir/second_child_with_kids/cousin1.txt parentdir/z_child.txt parentdir/child.txt parentdir/child2.txt

Get Bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.