I am looking forward to run commands and log their output in a temporary log file to be read later on by different processes.
So, for example:
rc.d start ntpd > progress.txt
does not exist or is not executable.
I assume, that since it’s an error it doesn’t get redirected, but, is there a way to force redirect everything to file?
Here is Solutions:
We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.
You only redirect
progress.txt but errors are normally written to
To redirect both
rc.d start ntpd &> progress.txt
You’ll find many additional information on this topic if you search for io-redirection.
Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂