Saravanan S <dearsarava...@...> writes: > I need to merge the contents of several directories, into a single > directory structure, > Like i have > dir1/a/1 > dir1/b/2 > dir2/a/10 > dir2/b/20 > > after merging dir1 and dir2, i should get, > > dirnew/a/1 and 10 > dirnew/b/2 and 20 > > How to do this easily?
Well, I cant believe this is still left unsolved. So, here is a (tried and tested) suggestion. How about using the -u option of the cp command? Like this, cp -r dir1/* dirnew cp -r -u dir2/* dirnew If the * expansion dies because of the number of files, then you may have to write a short script with the same logic. Sriram _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
