For long-running processes it is sometimes useful to know what the
output is before you get the email, I use this instead:
- Use
ps
to find the process ID of your running program (PID
below);
use lsof
to find the file the output is being written to:
lsof -p PID
In the output, look for the 1u
and 2u
lines under the FD
column header.
These lines will tell you what temporary files the process output is
going into before it is sent by mail. Typically, for at
, the file is
located under /var/spool/cron/atjobs/
. Finally, display that file
and you will find your process' (current) output.