i startet a wget-job with:
echo "sh my_wget_script.sh" | at 02:00
the script began to run at 02:00 at night.
i can find the wget-job in the “top” with ID 1234.
i tried to bring the job in the foreground with:
but i have no success.
i dont want kill the job.i only want bring the job in the foreground.
How can i do this?
You can’t. It’s not associated with your terminal.
Foreground/background and associated/not associated with terminal are distinct concepts. A foreground process simply means that the shell is waiting for its termination. Normally it would be associated with your current shell terminal, but even that can be detached from by the process. So the two dimensions don’t necessarily have any connection.
If you want to run a job which you may want to check up on later, take a look at the “screen” program which allows you to set up a terminal shell which can be detached from and reattached to at will, even from some other login.
ok, i know screen.
i helped me with:
tail -f /proc/1234/fd/1
Now i can see, what the script do.
-----BEGIN PGP SIGNED MESSAGE-----
Keep in mind that will get you STDOUT but not STDERR, just in case you
want to see things that are not going nto STDOUT (like errors).
> ok, i know screen.
> i helped me with:
> tail -f /proc/1234/fd/1
> Now i can see, what the script do.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----