Python Forum
using my flattree generator - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: using my flattree generator (/thread-7765.html)



using my flattree generator - Skaperen - Jan-24-2018

i think i already have a use for my flattree generator. i have 9 very large directories that i need to merge. i could merge them by running rsync 9 times, once for each source, all to a common destination. but i don't have a spare 600GB for the combined directory while the originals exist. i could do this with cp and the -l option, combining to a common destination. but it turns out there are a lot of hardlinked files, with some exceeding half of the supported maximum number of links. a hardlinked duplicate tree would double the number of links. so my idea is a Python command that will combine the 9 trees by moving everything except directories that are already moved. basically it would be s command to move a tree into another tree. it could simply "mv" the first tree and use this command for the last 8, either 8 times or with all 8 named on the command. it would need a consistent descent into all the trees.