1
我一直在远程服务器上拖拽同一目录的某些特定文件时出现问题。这里是我的代码:find命令中的-exec错误
ssh host find /path/to/a/dir -name "log*" ! -name "file" -print0 -exec tail -n 20 {} \;
它打印-exec: missing argument
。
我一直在远程服务器上拖拽同一目录的某些特定文件时出现问题。这里是我的代码:find命令中的-exec错误
ssh host find /path/to/a/dir -name "log*" ! -name "file" -print0 -exec tail -n 20 {} \;
它打印-exec: missing argument
。
您需要引用命令参数的ssh即
ssh host 'command options, etc., '
你'\;'被剥离到';',报价在全部的命令:'SSH主机“找到/路径/要/ A/dir -name“log *”! -name“file”-print0 -exec tail -n 20 {} \''' – Wrikken
omg !!非常感谢你 – user2864207