log-file output in separate files
Reuben D. Budiardja
techlist at voyager.phys.utk.edu
Wed Feb 25 13:35:05 UTC 2004
On Wednesday 25 February 2004 06:28 am, Paal Marker wrote:
> I need to store excerpts of logfiles in separate files from remote server.
>
> Usually I use the commands:
> grep -n "expression" /var/log/logfile
> and
> tail --lines=x /var/log/logfile
You mean, using redirection?
grep -n "expression" /var/log/logfile > newfile.txt
will store the output to the newfile.txt. The ">" sign basically redirect the
standard output to something (usually file).
RDB
>
> ...for getting output
>
> Is there a way to give these commands and then the output is
> automatically stored in a new file?
--
Reuben D. Budiardja
Department of Physics and Astronomy
The University of Tennessee, Knoxville, TN
---------------------------------------------------------
"To be a nemesis, you have to actively try to destroy
something, don't you? Really, I'm not out to destroy
Microsoft. That will just be a completely unintentional
side effect."
- Linus Torvalds -
More information about the redhat-list
mailing list