2020-10-06 17:05:51 +01:00
|
|
|
# logsave
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
> 将一个命令的输出保存在日志文件中。
|
2021-08-31 08:13:49 +01:00
|
|
|
> 更多信息:<https://manned.org/logsave>.
|
2020-10-06 17:05:51 +01:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 使用指定的参数执行命令并将其输出保存到日志文件中:
|
2020-10-06 17:05:51 +01:00
|
|
|
|
|
|
|
`logsave {{path/to/logfile}} {{command}}`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 从标准输入中获取输入并将其保存在日志文件中:
|
2020-10-06 17:05:51 +01:00
|
|
|
|
|
|
|
`logsave {{logfile}} -`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 将输出追加到日志文件,而不是替换其当前内容:
|
2020-10-06 17:05:51 +01:00
|
|
|
|
|
|
|
`logsave -a {{logfile}} {{command}}`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 显示详细输出:
|
2020-10-06 17:05:51 +01:00
|
|
|
|
|
|
|
`logsave -v {{logfile}} {{command}}`
|