From owner-freebsd-questions@FreeBSD.ORG Tue Feb 27 15:38:12 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 140CB16A4C8 for ; Tue, 27 Feb 2007 15:38:12 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id D101713C4A6 for ; Tue, 27 Feb 2007 15:38:11 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id l1RFZfGV064061; Tue, 27 Feb 2007 10:35:41 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id l1RFZekj064060; Tue, 27 Feb 2007 10:35:40 -0500 (EST) (envelope-from jerrymc) Date: Tue, 27 Feb 2007 10:35:40 -0500 From: Jerry McAllister To: Kelly Jones Message-ID: <20070227153540.GD63860@gizmo.acns.msu.edu> References: <26face530702261927w553488a1uae8629aa3d827497@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26face530702261927w553488a1uae8629aa3d827497@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Cc: nmlug@nmlug.org, freebsd-questions@freebsd.org, nmosug-l@mailman.swcp.com, linuxusersgroup@googlegroups.com Subject: Re: Effectively detaching 'less' from a pipe X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2007 15:38:12 -0000 On Mon, Feb 26, 2007 at 08:27:41PM -0700, Kelly Jones wrote: > I often run commands piped to 'less', to make sure the command is > working OK by looking at the first few lines of output. > > Once I'm convinced, though, I'd like to "get rid" of less, and just > have the rest of stdout spewed to the terminal (and/or /dev/null > and/or to a file I specify). > > In other words, I want to stop hitting 'space' until my program terminates. You got several good suggestions. Along a somewhat different path, have you checked out script(1). It isn't quite what you are asking, but might also be helpful. Just type 'script some_file_name' and it will dump all screen output to that file until you exit script with a CTRL-D. ////jerry > > How can I do this? > > My current kludges (both ugly): > > 1. do "command > file" and then "tail -f file | less" (this mostly > works, but takes a while to get started because of buffering issues) > > 2. do "command | less", and once I'm happy w/ the output, hit 'q' to > quit less (and thus terminate program) and then do "command > > /dev/null" (works, but wastes time, since I have to run the command > once just to look at the first few lines and then abort it) > > -- > We're just a Bunch Of Regular Guys, a collective group that's trying > to understand and assimilate technology. We feel that resistance to > new ideas and technology is unwise and ultimately futile. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"