很简单:前一个目录末尾是目录的话,最后是否带/是有区别的。

具体看测试:

# usr @ the-pc in ~/cptest02 [2:28:02]
$ ll
总用量 0 # usr @ the-pc in ~/cptest02 [2:28:03]
$ ll ../cptest01/
总用量 4
-rw-rw-r-- 1 usr usr 0 10月 11 02:23 11111file
drwxrwxr-x 2 usr usr 4096 10月 11 02:23 pppp # usr @ the-pc in ~/cptest02 [2:28:14]
$ rsync -av ../cptest01/ ./
sending incremental file list
./
11111file
pppp/
pppp/adadasd.file sent 187 bytes received 57 bytes 488.00 bytes/sec
total size is 0 speedup is 0.00 # usr @ the-pc in ~/cptest02 [2:28:33]
$ ll
总用量 4
-rw-rw-r-- 1 usr usr 0 10月 11 02:23 11111file
drwxrwxr-x 2 usr usr 4096 10月 11 02:23 pppp # usr @ the-pc in ~/cptest02 [2:28:46]
$ rsync -av ../cptest01 ./
sending incremental file list
cptest01/
cptest01/11111file
cptest01/pppp/
cptest01/pppp/adadasd.file sent 201 bytes received 58 bytes 518.00 bytes/sec
total size is 0 speedup is 0.00 # usr @ the-pc in ~/cptest02 [2:28:53]
$ ll
总用量 8
-rw-rw-r-- 1 usr usr 0 10月 11 02:23 11111file
drwxrwxr-x 3 usr usr 4096 10月 11 02:23 cptest01
drwxrwxr-x 2 usr usr 4096 10月 11 02:23 pppp # usr @ the-pc in ~/cptest02 [2:28:56]
$

(shell是zsh,主题是ys。)

[linux]在使用rsync时需要注意的小细节的更多相关文章

  1. rsync源目录写法的一点小细节

    原始状态: [root@localhost tmp]# tree . ├── a │ ├── a1 │ └── a2 └── b directories, files [root@localhost ...

  2. 如何在Linux下使用Rsync

    如何在Linux下使用Rsync 吐槽 昨天对scp进行总结之后看到最后有说到Rsync,俗语有云:好奇心害死猫.抱着学习的态度将Rsync给找了出来,然后进行了一些简单的学习.下面介绍一些个常用的命 ...

  3. Linux停SVN提交时强制写日志

    Linux下SVN提交时强制写日志 SVN默认可以不写注释提交,有时候可能忘记写注释,有的人也没有写注释的习惯,导致翻看history的时候都不知道做了哪些更改,可以依照以下步骤修改SVN配置,强制提 ...

  4. 记录Linux下安装elasticSearch时遇到的一些错误

    记录Linux下安装elasticSearch时遇到的一些错误 http://blog.sina.com.cn/s/blog_c90ce4e001032f7w.html (2016-11-02 22: ...

  5. linux上备份Oracle时EXP-00091的错误解决方法

    unix/linux上备份Oracle时EXP-00091的错误解决方法 unix/linux上备份数据时的错误解决方法 EXP-00091: Exporting questionable stati ...

  6. 解决在Linux下安装Oracle时的中文乱码问题

    本帖最后由 TsengYia 于 2012-2-22 17:06 编辑 解决在Linux下安装Oracle时的中文乱码问题 操作系统:Red Hat Enterprise Linux 6.1数据库:O ...

  7. Suse linux enterprise 11安装时更改磁盘模式为gpt的方法

    在进行鸟哥linux基础篇学习时,在"第3.2.2 选择安装模式与开机 -inst.gpt"中,鸟哥用到的CentOS 7需要用指令修改磁盘模式为gpt. 先用键盘选择Instal ...

  8. linux下安装Oracle时交换空间不足的解决方法

    摘:linux下安装Oracle时交换空间不足的解决方法 linux上安装Oracle时交换空间不足的解决办法 增加交换空间有两种方法: 严格的说,在系统安装完后只有一种方法可以增加swap,那就是本 ...

  9. Linux vi 文本代码时显示行号或不显示行号

    Linux vi 文本代码时显示行号或不显示行号 前提  安装了vim $vi ~/.vimrc 显示的话加上 set nu 不想显示的话可以注释掉 "set nu 之后 $source ~ ...

随机推荐

  1. Python—版本和环境的管理工具(Pipenv)

    pipenv简介 虚拟环境本质是一个文件,是为了适应不同的项目而存在.pipenv相当于virtualenv和pip的合体. 整合了 pip+virtualenv+Pipfile,能够自动处理好包的依 ...

  2. Linux system v 共享内存

    system v 共享内存 #include <sys/types.h> #include <sys/shm.h> int shmget(key_t key, size_t s ...

  3. [Linux] deepin系统添加PHP仓库源出错Error: could not find a distribution template for Deepin/stable

    aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Deepi ...

  4. for循环结构

    循环结构: 在程序当中总有一些需要反复/重复的执行的代码,假设没有循环结构,那么这段需要重复知心的需要重复执行的代码自然是需要重复编写的,代码无法得到重复使用.所以多数变成语言都是支持循环结构的.将来 ...

  5. 9. Go语言—流程控制

    一.流程控制语法 if condition_1{ }else if condition_2{ }else if condition_3{ }else{ } 二.switch分支 package mai ...

  6. linux passwd批量修改用户密码

    linux passwd批量修改用户密码 对系统定期修改密码是一个很重要的安全常识,通常,我们修改用户密码都使用 passwd user 这样的命令来修改密码,但是这样会进入交互模式,即使使用脚本也不 ...

  7. 环形链表 II

    给定一个链表,返回链表开始入环的第一个节点. 如果链表无环,则返回 null. 为了表示给定链表中的环,我们使用整数 pos 来表示链表尾连接到链表中的位置(索引从 0 开始). 如果 pos 是 - ...

  8. js字符串操作总结(必看篇)

    本文链接: https://www.jb51.net/article/97915.htm 字符方法 <!DOCTYPE html> <html lang="en" ...

  9. angular 使用ng-zorro的from组件 运行报错

    emplate parse errors: Can't bind to 'formGroup' since it isn't a known property of 'form'. 原因:没有导入表单 ...

  10. [随笔]ICPC2.0

    停更半年了.瞎扯下过去,现在与未来. 一.过去 1.插叙 讲道理我应该早就写这段在博客上了,不知怎么一直忘了. 在6月拿到ICPC南昌邀请赛的Ag还是比较满意,满意的最大原因是我弱校从没拿过Ag(? ...