find /i-data/md0/video/ -type d -empty -delete # print files/directories with size less 1M: cd /********/Videos/couchpotato-complete du -sh * | grep -P "\d+K" | awk '{for (i=2; imovies_to_delete.txt while read -r file; do rm -rv -- "$file"; done < movies_to_delete.txt rm -v movies_to_delete.txt