Help With Hard links And Symlinks Moving Directory And Files
- by Julio
This is what I would like to do.
I have a symlink "/var" linking to "/tmpfs/var.1"
/var - /tmpfs/var.1
I start a script called "cache_tmpfs" from /etc/rc.local on startup
this script will copy /var.backup/* contents to /tmpfs/var.1/
cp -dpRxf /var.backup/* /tmpfs/var.1/
now the problem is that kernel is opening messages log file in /var/log/messages,
is it possible to remove the current /var symlink and recreate a new one (that will symlink to /var.backup insteed of /tmpfs/var.1) without issues as files once opened by system become hard links??
rm /var &&
ln -s /var.backup /var
Thanks...