scp命令输出日志后台执行
If you are a busy person, then the last thing you need is to be bothered with a huge amount of ‘useless’ notifications, so how do you quieten things down? Today’s SuperUser Q&A post has some great answers to help a reader quieten down the amount of output.
如果您是一个忙碌的人,那么您需要做的最后一件事就是打扰大量的“无用”通知,那么您如何使事情安静下来? 今天的“超级用户”问答页面提供了一些不错的答案,可以帮助读者降低输出量。
Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.
今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。
问题
(
The Question
)
SuperUser reader Xster wants to know how to run a command in the background with no output unless there is an error:
超级用户阅读器Xster想要知道如何在没有输出的情况下在后台运行命令,除非出现错误:
How do you suppress a command’s output, but show it if the command’s exit codes an error?
您如何抑制命令的输出,但是如果命令的退出编码为错误,则如何显示呢?
How do you get a command to run in the background with no output unless there is an error?
除非出现错误,如何获得没有输出的后台运行命令?
答案
(
The Answer
)
SuperUser contributors Bob and Maximillian Laumeister have the answer for us. First up,