Acabei de gravar em um arquivo:
find ~/dim_import/* -type f ! -name xdir | cut -d '/' -f 5-6 > files
e, em seguida, percorrendo o arquivo "files" e criando os diretórios a partir dele e copiando os arquivos para lá.
while read line; do
fileDir='echo "$line" | cut -d '/' -f 1' # get folder name
fileName='echo "$line" | cut -d '/' -f 2' # get file name
cd ~/"sr${srNum}" # go to SR folder
# If proper directory doesn't exist, create
if [ ! -d "$fileDir" ]; then
mkdir "$fileDir"
fi
# Copy file to respected directory
cd $ROOT # go back to dim_import
cp "$fileDir/$fileName" ~/"sr$srNum/$fileDir" # copy file to fileDir folder
cd ~/"sr$srNum/$fileDir" # go to fileDir
chmod u+w "$fileName" # mod the file for write access for changes
cd $ROOT # go back to dim_import
done < files