#!/bin/bash find . -maxdepth 1 -type f \( -name "*.tar*" -o -name "*.tgz" -o -name "*.tar.bz2" \) -exec sh -c 'tar -xf "{}" && rm "{}"' \;