Skip to content
Advertisement

unlinking a file in linux

I am new to Linux and trying to understand some things. In my docker image I see that the error.log is linked to stdout.

ln -sfT /dev/stderr "/var/log/apache2/error.log"

What is the command to unlink this so the error.log is written again?

Advertisement

Answer

unlink and then touch the file.

JavaScript

Then test the procedure by writing to the log:

JavaScript

If apache for some reason is still not writing to the file, try reloading the service,

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement