[英]How to append systemctl output into a file?
我似乎不能 append output 的“systemctl is-enabled autofs >> /scripts/test”,因为它会完全忽略 append 到我的文件中:
有什么办法可以把append和output成一个文件?
systemctl(和许多命令)将其中的一些 output 返回到标准错误,而不是标准输出。 尝试使用以下内容加入 stderr 和 stdout:
systemctl is-enabled autofs 2>&1 >>/scripts/test
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.