Suppose this situation
wget http://file
wget starts to download file.
I put it in the background.
^Z
bg
The command goes into the background.
But its output is still on the console also -- if the console is still open.
Is it possible to stop the command's output?
Wget is only an example; think about a command which writes a lot of output.
At the console, I know it is possible to do bg
and then close terminal and open another, but what if I have only one terminal avaliable and no pseudo-terminals?
Here's a solution that actually redirects the output of a command while it is running: https://superuser.com/questions/732503/redirect-stdout-stderr-of-a-background-job-from-console-to-a-log-file
For a solution that is more usable in an every-day scenario of using a terminal, you could do wget -o log http://file &
to run wget
in the background and write its output to log
instead of your terminal. Of course, you won't see any output at all in this case (even if you ran wget
in foreground), but you could do tail -f log
to look at the output as it grows.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다