0

I am doing some mathematical calculations using basic (embarrasing) parallel computing.

There is a parent directory called calculations/ in which many directories are created that are called calculations/PID/ where PID is process ID. There are about 100 different PIDs. In every PID folder there is a folder called "REZ" in which all results are stored as so:

calculations/PID/REZ/UNIQUE_DIR_NAME/*

where UNIQUE_DIR_NAME are subdirectories that contain all text results inside.

I need to copy all these UNIQUE_DIR_NAME from various PID directories into one, so that all my results would be stored in calculations/REZ/UNIQUE_DIR_NAME/*

How do I copy everything in such way? I am using Fedora 20 on my computer and openSUSE 13.1 on calculations machine so methods for both systems are fine with me. It would probably be faster to copy everything as needed on openSUSE system, then zip and only THEN download to my fedora system.

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
  • Do you need to preserve the UNIQUE_DIR_NAME? Or are the contents of the UNIQUE_DIR_NAME directories also unique? I.e. do you want all the text result files in one directory or should they still be separated? – wurtel Feb 04 '15 at 12:28
  • I need to preserve the UNIQUE_DIR_NAME. All contents in every UNIQUE_DIR_NAME have same names. All text results should be separated by UNIQUE_DIR_NAME directories, I just need to remove separation by PID. Additional note: there are many trash files (probably with same names) in every PID/ folder. I do not need those. I only need what is contained in every REZ folder. – MrModern Feb 04 '15 at 12:32

1 Answers1

2
mv calculations/[1-9]*/REZ/* calculations/REZ/
Hauke Laging
  • 88,146
  • 18
  • 125
  • 174