I've two RFS (
Root File System) directories, which I would like to compare to each other with
diff. Both directories represent an RFS of some other system, and they may contain links. If those links are absolute, they will point to something useless.
For example, I've one RFS with the following symlink (inside the RFS):
/usr/test -> /home/test/file1
Now I've this complete RFS inside a directory named
/home/user/compare, and the absolute paths of both files mentioned above are
Clearly, the symlink
/home/user/compare/usr/test doesn't point to the right file. And because of that a comparison with the files in
/home/usr/compare with some other RFS directory will fail for those symlinks.
Is it possible to setup
diff so it assumes not
/ as root but
/home/user/compare as root (for the comparison), so that the given absolute symlink points to something valid, and
diff takes it into account?
Maybe there is a similar Linux command I can use for that?