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 rm -rf删除文件,但是当我用ssh host rm -rf /disk/directory/*结果显示
ssh host rm -rf
ssh host rm -rf /disk/directory/*
ssh: No match.
问题是什么 ?
谢谢 ...
在传输之前,“*”会在本地计算机的命令行上展开。最简单的解决方法应该是:
ssh host rm -rf /disk/directory/
您的 glob 模式*在传递给ssh.
*
ssh
您需要将其传递给ssh. 使用引号:
ssh host "rm -rf /disk/directory/*"