Re: Capturing output of vacuumdb and pg_dump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: alien(at)spaceship(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Capturing output of vacuumdb and pg_dump
Date: 2003-04-12 17:25:57
Message-ID: 18873.1050168357@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Matt Mello" <alien(at)spaceship(dot)com> writes:
> I am a linux shell [bash/sh] newbie. I want to capture the output of the
> vacuumdb and pg_dump commands to a log file. I want all of the lines that
> are normally displayed on the screen to be *appended* to a single log file
> that I can inspect offline at my convenience. I have discovered that
> ">>logfile" won't get all of the data. Can someone point me to an example
> of how to do that?

You're missing stderr. On sh/bash type shells you want

foo >>logfile 2>&1

There is some other locution on csh and its descendants, but I forget
what.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Matt Mello 2003-04-12 21:57:41 When is postmaster ready?
Previous Message Matt Mello 2003-04-12 17:18:37 Capturing output of vacuumdb and pg_dump