X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Fri, 25 Nov 2011 15:21:52 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: tail/head not working with a pseudoterminal
Message-ID: <20111125142152.GK23778@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <CAEYw_q=jHbGUB66fwxtnVJ1A9THAoi+FehOLXNYD3_UxRydjLw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <CAEYw_q=jHbGUB66fwxtnVJ1A9THAoi+FehOLXNYD3_UxRydjLw@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Nov 25 16:03, Costin Caraivan wrote:
> Hello,
> 
> I'm trying to tail a file through SSH. I'm launching ssh through
> Python, like this:
> ssh -t user@vm-admin.corp.com "tail
> /cygdrive/c/ctier/ctl/var/logs/ctlcenter/STAGING/Administration/\[Staging\]\
> Sleep/7.txt"
> 
> And I get this:
> Pseudo-terminal will not be allocated because stdin is not a terminal.
> TAIL: lseeki64() failed 22

This is not Cygwin's tail.  The error message looks pretty weird.

Try ssh -tt.

> This works from the command line :(
> 
> Also head fails with:
> Pseudo-terminal will not be allocated because stdin is not a terminal.
> bash: /cygdrive/c/apps/activeperl/bin/head: /usr/bin/perl: bad
> interpreter: Permission denied

You're running the wrong head command.  This is some activestate perl
script, not the Cygwin head tool from coreutils.  Change your $PATH
to find the Cygwin apps first.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

