mysql -u scott-h machine.domain.com -p -D foo_db < foo.sql
If I add an ampersand at the end, it suspends the job. I want the flexibility to run this background so that this time consuming process doesn’t end, even if I log out of the shell / machine which launched it.
Should I be using nohup enter code herealong with a & at the end. How do I know if this job got completed?
The use of
nohupand&can be used.i.e
For stderr and stdout to go to the logfile. Use /dev/null instead of logfile if you want not to record the output.