下面的管道是如何工作的?
last | reboot
上面重新启动了 Linux 机器。
最佳答案
last
搜索最后登录的用户,并将 last
输出提供给 reboot
,并且 reboot
将重新启动系统。
last | reboot
| | => process1 output will be input
process1 process2 for process2
查看上面所说的man 1 last
Last searches back through the file /var/log/wtmp (or the file desig‐ nated by the -f flag) and displays a list of all users logged in (and out) since that file was created.
正如 Daniel 所说,reboot
并不关心其输入。它可能根本不读取它,因此输入某些内容不会改变它的行为。
关于linux - 最后|在linux中重新启动会重新启动机器,有人可以解释为什么吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49837940/