sed -i on a Symlink
/etc/app.conf is a symlink to /opt/app/conf/app.conf. After sed -i 's/debug/info/' /etc/app.conf, the app still reads the old value from /opt/…. Why?
/etc/app.conf
/opt/app/conf/app.conf
sed -i 's/debug/info/' /etc/app.conf
/opt/…
Choose one answer
sed -i refuses to edit files outside the current directory.
sed -i
It writes a new file and renames it over the link itself.
Symlinked files are read-only for every program except the one that created the link.
sed only changes the first line of a file unless g is given.
sed
g