From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14526 invoked from network); 27 Apr 2000 08:22:46 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Apr 2000 08:22:46 -0000 Received: (qmail 24923 invoked by alias); 27 Apr 2000 08:22:08 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3039 Received: (qmail 24900 invoked from network); 27 Apr 2000 08:22:07 -0000 Date: Thu, 27 Apr 2000 11:20:04 +0300 From: Ville Herva To: zsh-users@sunsite.auc.dk Subject: Redirecting output afterwards Message-ID: <20000427112004.A3089@babbage.tky.hut.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0pre3i Often I've logged in from another location and then began executing a large job, say "tar czvf foo /". Later, it turns out that the job will take hours to complete, and I'll have to log out before that. Of course, I will then ^Z, bg and disown the job, but I will lose the output. Sometimes it is essential to know if the job returned errors or warnings. The output itself is sometimes crucial (du, for example, can take hours in ~70GB data dir). Now, if I had been clever enough to realize this when I launched the job, this would be no problem: prompt % nohup job prompt % job >& file & or even prompt % screen job but now the job has already been running for hours, and I wouldn't wan't to start it all over again just to be able to log out and later see the result. What I was thinking is that could something like prompt % job & [1] 6643 (after some hours) prompt % %1 >& output.file # redirect output of a running job prompt % disown %1 prompt % exit be possible in theory? -- "Sillä minä en ole mukava mies, enkä siksi syyttä huou tätä mykistävää kyynisyyttä ja kaltaiseni luonne vaatii vuosikausien harjoituksen, en ole mukava mies! Hyväntahtoisuuteni loppuu tähän! Painukaa helvettiin! Niin! En ole mukava mies! E-en! En ole mukava, En ole mukava mies!" - YUP