I have several folders ("amazon", "niger", "rhine",...). Inside each of them I have several subfolders ("gfdl", "hadgem", "ipsl",...). Each subfolders is composed by 5 subfolders (e.g. in "amazon", the subfolder "gfdl" is composed by 5 subfolder 'amazon_gfdl', 'amazon_gfdl1', ..., 'amazon_gfdl5'); and the others subfolders follow the same structure (e.g. in "amazon" subfolder "ipsl" is composed by 5 subfolders 'amazon_ipsl', 'amazon_ipsl1', 'amazon_ipsl2',...until 'amazon_ipsl5'.
I have a huge amount of folder following the same frame of organisation. Therefore my question is the following:
How can I organise each folder and subfolder in such a way that in each subfolder ("gfdl", "hadgem","ipsl",...), 4 new directories are created ("1", "2", "3", "4"); and then that the folder e.g. "amazon_gfdl" (already present in "gfdl") is copied in each of those new directories and finally that "amazon_gfdl1" is moved to the new directory "1", "amazon_gfdl2" is moved to the new directory "2", and so on!
I am currently using the command cp and move within each subfolders but it´s not really efficient and I might need an extra life to end this task like that! Therefor any helps or hint will be greatly appreciated. Thanks you very much!
ln
the files or do they need to be separate copies? – meuh Aug 02 '15 at 14:30