两个slackware 14.2系统,ssh是7.9p1。
在本地系统上
mkdir -p -v "I want to create long dir name with spaces"
mkdir: directory 'I want to create long dir name with spaces' created
并且还可以
在远程
ssh remote mkdir -p -v "I want to create long dir name with spaces"
mkdir: created directory 'I'
mkdir: created directory 'want'
mkdir: created directory 'to'
mkdir: created directory 'create'
mkdir: created directory 'long'
mkdir: created directory 'dir'
mkdir: created directory 'name'
mkdir: created directory 'with'
mkdir: created directory 'spaces'
为什么?
我尝试使用 ' 而不是 " 和
ssh remote mkdir -p -v 'I want to create long dir name with spaces'
以 0(成功)退出,但未创建目录
答案1
找到解决方案
ssh remote mkdir -p -v 'I\ want\ to\ create\ long\ dirname\ with\ spaces'
我不明白为什么远程会有所不同,我必须使用\
.