I'm doing this to get the user dynamic dependencies (not those in /lib64, but in /usr/lib64).
[root@localhost bin]# ldd Xvfb | grep '/usr/lib64/' | cut -d '=' -f1
libcrypto.so.10
libGL.so.1
libpixman-1.so.0
libXfont.so.1
libXau.so.6
libxshmfence.so.1
libXdmcp.so.6
libglapi.so.0
libXext.so.6
libXdamage.so.1
libXfixes.so.3
libX11-xcb.so.1
libX11.so.6
libxcb-glx.so.0
libxcb-dri2.so.0
libxcb.so.1
libXxf86vm.so.1
libdrm.so.2
libfreetype.so.6
libfontenc.so.1
libfreebl3.so
I would like to copy these files from /usr/lib64 to another machine (CentOS to CentOS, nearly identical builds), most likely by way of transferring a tarball. Most of these are probably symlinks to their latest version, so those files would have to be included too, and the symlinks need to be recreated on the other machine.
It has to be done this way because there are no package managers on the target machine and it is sandboxed (no internet).
I'm thinking this list can be turned into a single string that can be passed to tar, but I'm not familiar with how to go about it. I have to do this for a few binaries, so a one-liner would be great if it can be done. Any ideas?