#!/bin/bash
for FILE in $(find . -type f -regex '.*\.rar$'); do
    mv $FILE .
done