Gil*_*il' 33
冒号仅在命令行参数的第一个目录组件中是特殊的。因此,如果您有看起来像相对路径的内容,请添加./
.
$ mkdir sou:rce
$ rsync -a sou:rce/ de:st/
The source and destination cannot both be remote.
$ rsync -av ./sou:rce/ ./de:st/
sending incremental file list
created directory ./de:st
./
Run Code Online (Sandbox Code Playgroud)
在脚本中:
case $source in
/*) :;;
*) source=./$source;;
esac
case $dest in
/*) :;;
*) dest=./$dest;;
esac
rsync "$source" "$dest"
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
11208 次 |
最近记录: |