e2fsck | tee causes "need terminal for interactive repairs" error - Linux

This is a discussion on e2fsck | tee causes "need terminal for interactive repairs" error - Linux ; If I pipe the output of e2fsck to tee, to capture a copy of its output, then e2fsck refuses to run interactively, because it wrongly thinks that it isn't running on an interactive terminal. Does anyone know a workaround for ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: e2fsck | tee causes "need terminal for interactive repairs" error

  1. e2fsck | tee causes "need terminal for interactive repairs" error

    If I pipe the output of e2fsck to tee, to capture a copy of its
    output, then e2fsck refuses to run interactively, because it wrongly
    thinks that it isn't running on an interactive terminal. Does anyone
    know a workaround for this problem?

    I'm running it on Knoppix (Debian-based). Here's the output:

    root@ttyp0[hdd9]# e2fsck -v /dev/hdd6 | tee -a hdd6log
    e2fsck 1.35-WIP (21-Aug-2003)
    e2fsck: need terminal for interactive repairs
    root@ttyp0[hdd9]# uname -a
    Linux Knoppix 2.4.22-xfs #1 SMP Fr Okt 3 20:36:25 CEST 2003 i686
    GNU/Linux
    root@ttyp0[hdd9]#

    Thanks,
    -Dave

  2. Re: e2fsck | tee causes "need terminal for interactive repairs"error

    Dave Burton wrote:

    > If I pipe the output of e2fsck to tee, to capture a copy of its
    > output, then e2fsck refuses to run interactively, because it wrongly
    > thinks that it isn't running on an interactive terminal.


    Sorry, but it /rightly/ thinks that it isn't running on an interactive
    terminal. To it, stdout is /not/ directed to a tty, and this means that
    e2fsck /isn't/ being run interactively.

    > Does anyone
    > know a workaround for this problem?


    I don't /know/ of a workaround, but if one exists, I'd expect that it
    involves PTYs or the use of ttysnoop

    > I'm running it on Knoppix (Debian-based).


    Take a look at http://ftp.debian.org/debian/pool/main/t/ttysnoop/

    [snip]


    --
    Lew Pitcher, IT Consultant, Application Architecture
    Enterprise Technology Solutions, TD Bank Financial Group

    (Opinions expressed here are my own, not my employer's)


  3. Re: e2fsck | tee causes "need terminal for interactive repairs" error

    Dave Burton wrote:

    > If I pipe the output of e2fsck to tee, to capture a copy of its
    > output, then e2fsck refuses to run interactively, because it wrongly
    > thinks that it isn't running on an interactive terminal. Does anyone
    > know a workaround for this problem?
    >


    For a workaround, using the "script" command.

    --

    Stu

  4. Re: e2fsck | tee causes "need terminal for interactive repairs" error

    "Dave Burton" wrote in message
    news:e401873.0312301153.73b279ee@posting.google.co m...
    > If I pipe the output of e2fsck to tee, to capture a copy of its
    > output, then e2fsck refuses to run interactively, because it wrongly
    > thinks that it isn't running on an interactive terminal. Does anyone
    > know a workaround for this problem?
    >
    > I'm running it on Knoppix (Debian-based). Here's the output:
    >
    > root@ttyp0[hdd9]# e2fsck -v /dev/hdd6 | tee -a hdd6log
    > e2fsck 1.35-WIP (21-Aug-2003)
    > e2fsck: need terminal for interactive repairs
    > root@ttyp0[hdd9]# uname -a
    > Linux Knoppix 2.4.22-xfs #1 SMP Fr Okt 3 20:36:25 CEST 2003 i686
    > GNU/Linux
    > root@ttyp0[hdd9]#
    >


    Depending on what you are doing, a simple solution may be to run
    noninteractively (-p).

    George Elkins




+ Reply to Thread