Tracking Background PRocess
I have a script running for the last 3 days continously.It is running on the Background.
#fg %1 is a command which tend to bring it in fore-ground.
Now I want to write the output to a file without stopping the process.
All I know is Process ID but finding difficulty in printing it in file.
If the process in question produces output to stdout (shows on screen while running in foreground), then use the tee command to also write to a file.
fg %1 | tee filename
That will allow on-screen output as well as write to the filename.
|All times are GMT -5. The time now is 03:41 AM.|