| 1 |
.\" -*- nroff -*- |
| 2 |
.\" Copyright 2003 by Theodore Ts'o. All Rights Reserved. |
| 3 |
.\" This file may be copied under the terms of the GNU Public License. |
| 4 |
.\" |
| 5 |
.TH LOGSAVE 8 "July 2025" "E2fsprogs version 1.47.3" |
| 6 |
.SH NAME |
| 7 |
logsave \- save the output of a command in a logfile |
| 8 |
.SH SYNOPSIS |
| 9 |
.B logsave |
| 10 |
[ |
| 11 |
.B \-asv |
| 12 |
] |
| 13 |
.I logfile cmd_prog [ ... ] |
| 14 |
.SH DESCRIPTION |
| 15 |
The |
| 16 |
.B logsave |
| 17 |
program will execute |
| 18 |
.I cmd_prog |
| 19 |
with the specified argument(s), and save a copy of its output to |
| 20 |
.IR logfile . |
| 21 |
If the containing directory for |
| 22 |
.I logfile |
| 23 |
does not exist, |
| 24 |
.B logsave |
| 25 |
will accumulate the output in memory until it can be written out. |
| 26 |
A copy of the output will also be written to standard output. |
| 27 |
.PP |
| 28 |
If |
| 29 |
.I cmd_prog |
| 30 |
is a single hyphen ('-'), then instead of executing a program, |
| 31 |
.B logsave |
| 32 |
will take its input from standard input and save it in |
| 33 |
.I logfile |
| 34 |
.PP |
| 35 |
.B logsave |
| 36 |
is useful for saving the output of initial boot scripts |
| 37 |
until the /var partition is mounted, so the output can be written to |
| 38 |
/var/log. |
| 39 |
.SH OPTIONS |
| 40 |
.TP |
| 41 |
.B \-a |
| 42 |
This option will cause the output to be appended to |
| 43 |
.IR logfile , |
| 44 |
instead of replacing its current contents. |
| 45 |
.TP |
| 46 |
.B \-s |
| 47 |
This option will cause |
| 48 |
.B logsave |
| 49 |
to skip writing to the log file text which is bracketed with a control-A |
| 50 |
(ASCII 001 or Start of Header) and control-B (ASCII 002 or Start of |
| 51 |
Text). This allows progress bar information to be visible to the user |
| 52 |
on the console, while not being written to the log file. |
| 53 |
.TP |
| 54 |
.B \-v |
| 55 |
This option will make |
| 56 |
.B logsave |
| 57 |
to be more verbose in its output to the user. |
| 58 |
.SH AUTHOR |
| 59 |
Theodore Ts'o ([email protected]) |
| 60 |
.SH SEE ALSO |
| 61 |
.BR fsck (8) |