[PLUG] nohup output to different out file

Pranav Peshwe pranavpeshwe at gmail.com
Mon Nov 15 05:56:47 PST 2010


On Mon, Nov 15, 2010 at 7:04 PM, Agnello George <agnello.dsouza at gmail.com>wrote:

> Hi
>
> I have a small query i need to download multiple file and run it in
> the back ground  and log it to  mutiple out files
>
> so this is what have to do
>
> nohup wget  http://download1 &  -----> the output is redirected to
> nohup.out
>
> again i download2
>
> nohup wget  http://download2 &  -----> the outout is appened to nohup.out
>
> My query how to i tell nohup to redirect its output to nohup1.out or
> download2log.out
>
>
In general, `nohup command > filename` should do it. It will redirect both
output and error descriptors into filename.
One notable difference would be - `nohup command`  will *append* to
nohup.out, while `nohup command > filename` will (owing to the '>') truncate
the file to zero before writing.

HTH.

- P


More information about the plug-mail mailing list