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

具体看测试:

# 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. Linux 内存文件系统-ramfs and tmpfs

    Linux内存文件系统:可满足高IO的要求 ramdisk: 基于虚拟在内存中的其他文件系统(ex2fs). 挂载方式:mount /dev/ram /mnt/ramdisk ramfs: 物理内存文 ...

  2. 5-2可视化库Seaborn-调色板

    In [1]: import numpy as np import seaborn as sns import matplotlib.pyplot as plt %matplotlib inline ...

  3. Flask request接口获取参数

    Flask request接口获取参数   request.form.get("key", type=str, default=None) 获取表单数据, request.args ...

  4. nginx高级用法

    功能 说明 配置语法 配置位置 配置举例 结果验证 备注 rewrite 跳转重定向(不同于代理的跳转重定向,此处nginx不是代理服务器,而是本身就是web服务器) rewrite 正则表达式 re ...

  5. OpenGL基础代码整理

    3-1:画点,连成线 // OPENGL.cpp : Defines the entry point for the console application. // #include "st ...

  6. 2019.6.13_SQL语句中----删除表数据drop、truncate和delete的用法

    一.SQL中的语法 1.drop table 表名称                         eg: drop table  dbo.Sys_Test   2.truncate table 表 ...

  7. 使用Python拆分数据量大的CSV文件(亲测有效)

    转载:https://www.cnblogs.com/FYZHANG/p/11629075.html 一次就运行成功了,感谢博主分享 #!/usr/bin/env python3 # -*- # @F ...

  8. VMWare 怎样复制/copy部署好的一台虚拟机

    1:修改 vi /ect/udev/rules.d/70-persisten-net.rules 2:执行命令:uuidgen eth0 3:vi /etc/sysconfig/network-scr ...

  9. LeetCode 232:用栈实现队列 Implement Queue using Stacks

    题目: 使用栈实现队列的下列操作: push(x) -- 将一个元素放入队列的尾部. pop() -- 从队列首部移除元素. peek() -- 返回队列首部的元素. empty() -- 返回队列是 ...

  10. 数据竞争检查工具(TSan)

    https://github.com/google/sanitizers/wiki https://github.com/google/sanitizers/wiki/ThreadSanitizerC ...