#!/bin/bash FILES=$(find public_html -type f -name '*.gz') for f in $FILES do gzip -d $f # take action on each file. done