# Archive content which hasn't been modified within the last 6months
find . -mtime +180 | while read -r name; do rsync -rLvPz --remove-source-files "$name" rsync://homenas/Backups/hd/; done
# Delete folders which have contents < 50kb
find /path/to/root/folder -mindepth 1 -maxdepth 1 -type d -exec du -ks {} + | awk '$1 <= 50' | cut -f 2- | xargs -d \\n rm -rf