i need to write a script that compares two directories AAAA & BBBB. The differences in directory AAAA should be copied to BBBB. Just like incremental copy. One more thing that were are about 200000 files in both directories to compare. The server is powerful enough. Can someone help to write a script? All the action is done in one server. The files are copied between serveral storages. First i make file list of both directories with find, sed and cut and sort. Then compare two text files with diff or comm... the differences go to new text file. And then just copy the files from the list with cp. Maybe someone has good thoughts about how to speed up and put everything into one script? Thanks
i don't need files to be moved between serverts, i nedd them to be moved between storages(different partitions)
actually if by 200k you mean 200 thousand, you will not be able to do that with a script as the number of arguments most commands can take is limited. Still i don't see how a script that is being interpreted can be faster than a binary program