From owner-freebsd-questions@freebsd.org Thu Oct 24 02:48:03 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D3466175ABB for ; Thu, 24 Oct 2019 02:48:03 +0000 (UTC) (envelope-from mueller6722@twc.com) Received: from dnvrco-cmomta03.email.rr.com (dnvrco-outbound-snat.email.rr.com [107.14.73.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46zBW64cjhz4C6V for ; Thu, 24 Oct 2019 02:48:02 +0000 (UTC) (envelope-from mueller6722@twc.com) Received: from localhost ([96.28.161.151]) by cmsmtp with ESMTP id NTAJihokUWnTiNTALiEkTl; Thu, 24 Oct 2019 02:47:59 +0000 Date: Thu, 24 Oct 2019 02:47:54 +0000 From: "Thomas Mueller" To: freebsd-questions@freebsd.org Subject: Re: How to pipe kldstat output to a file in console References: <94a6b756-27bf-0363-b6f2-c711c33ab2c2@panix.com> X-CMAE-Envelope: MS4wfDew2sABWl2L9zLI0t2ssnxDrxojeriXdZNaYrxW/Rs83mhwpzPeXUJVjhHPz5ukm/K0MuvicSYtlyfB0n0rLA2bv9lhS9pHDkPKzBOCjBZXqU7XcRjW FiAhHJJfgL4Ddi7WuRcLhGK1gBe1YsVAPfleeSLH++J49F9607UhJtAm8CSEHah9zUpEVhwH2L+kRw== X-Rspamd-Queue-Id: 46zBW64cjhz4C6V X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mueller6722@twc.com designates 107.14.73.232 as permitted sender) smtp.mailfrom=mueller6722@twc.com X-Spamd-Result: default: False [0.21 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; RECEIVED_SPAMHAUS_PBL(0.00)[151.161.28.96.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:107.14.73.0/24]; FREEMAIL_FROM(0.00)[twc.com]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[twc.com]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MISSING_MID(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[232.73.14.107.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[twc.com]; ASN(0.00)[asn:7843, ipnet:107.14.73.0/24, country:US]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.00)[ip: (-2.73), ipnet: 107.14.73.0/24(-2.70), asn: 7843(-2.16), country: US(-0.05)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2019 02:48:03 -0000 On 2019-10-23 20:54, Clay Daniels Jr. wrote: > I can run kldstat in the console, but I need to save the output. I can't > get to graphical xorg, just the console at command line. From the file, I > can send that to a usb thumb drive and email the file, no problem, but > getting it from the screen to a file is my problem. Surely there's a way? > Shell redirect? For example: Kurt Hackenberg responded: > kldstat >/thumbdrive/foo > There's also: > kldstat | Mail clay.daniels.jr@gmail.com My favorite way is, shell redirect csh or tcsh kldstat |& tee outputfile.txt You can use any file name and path you like in place of outputfile.txt . For ksh, sh, bash: kldstat 2>&1 | tee outputfile.txt This way includes any error messages that might occur. Tom