Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2019 02:47:54 +0000
From:      "Thomas Mueller" <mueller6722@twc.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: How to pipe kldstat output to a file in console
References:  <CAGLDxTXUBgzP3ZRQXzj1w8bJpS%2BWEOyKkpBi7argMz5-MiegfQ@mail.gmail.com> <94a6b756-27bf-0363-b6f2-c711c33ab2c2@panix.com>

| previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?>