许多用户使用 ssh 访问一个服务器。我试图找出哪个用户执行了某个命令。
我可以知道当前访问服务器的用户列表,who 我也会知道使用history.
who
history
但是如何知道哪个用户cp file1.sh file2.sh在服务器中执行了命令?用户已执行命令并退出
cp file1.sh file2.sh
linux ssh bash command-history
bash ×1
command-history ×1
linux ×1
ssh ×1