Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在拖尾远程服务器上同一目录的某些特定文件时遇到问题。这是我的代码:
ssh host find /path/to/a/dir -name "log*" ! -name "file" -print0 -exec tail -n 20 {} \;
它打印-exec: missing argument。
-exec: missing argument
您需要将命令参数引用到 ssh 即
ssh host 'command options, etc., '