Copy files then copy them to dest directory (Keep orig directory structure) find /data/Nogizaka46 -name "*.flv" > flv.txt rsync --files-from=/data/Nogizaka46/flv.txt -avR / /data/Archive/ Directory path structure sync cat flv.txt| awk -F "/" 'OFS="/"{$NF="";print}' | xargs -I {} mkdir -p /data/Archive{} Move files dest directory (Based on directory path structure sync) cat flv.txt | xargs -I {} mv "{}" "/data/Archive{}" Find and decompress zip files to current directory $ cat unzip.sh #!/bin/bash IFS=$'\n' for DIR_NAME in `find /data/Downloads/Photobook -type d` do cd "$DIR_NAME" if ls | grep -q zip then ls | grep zip | xargs -I {} unzip "{}" fi done