You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more
Just wondering if there's any way to have a linked copy of a directory structure but to have one file different in the each copy? It's another one I feel I should know, but can't even work out what to search for.
It's a complete filesystem (several GB) I want to do this with - doing a PXE boot and want to simultaneously boot two different clients and see what difference a small change makes.
Can you use lndir?
It creates a shadow directory containing a symlink for each file (recursively). You could then modify the one file you want to change.
It might go wrong though if the PXE boot fails to follow the symlinks.
overlayfs
Thanks for the help, but neither of those seem to work with PXE 🙁
If PXE has problems with symlinks then a hard link farm (shame lndir can't do those for you) will work, but you'll have to be careful that when you make the modifications to the copy you don't change the original at the same time!
Yay, that did the trick, thanks! I new there had to be a simple trick.
Easier to set up than I was expecting as well, just did:
[code]cp -ral original new[/code]
...and I did remember to unlink and copy before editing
Only tricky bit is that this was the base of a filesystem, so as I couldn't hard link across filesystems I had to create a new top level directory and move the rest down so I had space to make the copy on the same filesystem.