Re: Capturing output of vacuumdb and pg_dump

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Capturing output of vacuumdb and pg_dump
Дата
Msg-id 18873.1050168357@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Capturing output of vacuumdb and pg_dump  ("Matt Mello" <alien@spaceship.com>)
Список pgsql-admin
"Matt Mello" <alien@spaceship.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


В списке pgsql-admin по дате отправления:

Предыдущее
От: "Matt Mello"
Дата:
Сообщение: Capturing output of vacuumdb and pg_dump
Следующее
От: "Matt Mello"
Дата:
Сообщение: When is postmaster ready?