当前位置: 首页 > news >正文

肥西网站推广公司成都哪里好玩适合小孩

肥西网站推广公司,成都哪里好玩适合小孩,桂林两江四湖景区,深圳网站建设公司招聘电话销售rsync是什么#xff1f; rsync 是一个远程同步工具 下载 你的集群每一台都需要下载#xff01;#xff08;也就是你需要同步的机器#xff09; yum install -y xsync如果其他不下载就是报错的这样#xff08;使用脚本的情况下#xff0c;注意这里是提示 rsync没有找到…rsync是什么 rsync 是一个远程同步工具 下载 你的集群每一台都需要下载也就是你需要同步的机器 yum install -y xsync如果其他不下载就是报错的这样使用脚本的情况下注意这里是提示 rsync没有找到不是xsync [rootmaster bin]# xsync /opt/test/master sending incremental file listsent 97 bytes received 17 bytes 76.00 bytes/sec total size is 10 speedup is 0.09slave1 bash: rsync: 未找到命令 rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: remote command not found (code 127) at io.c(226) [sender3.1.2]slave2 bash: rsync: 未找到命令 rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: remote command not found (code 127) at io.c(226) [sender3.1.2]优点与scp对比 优点rsync主要用于备份和镜像。具有速度快、避免复制相同内容和支持符号链接的优点。 与scp对比rsync 要比scp复制速度快因为 rsync 是复制有差异性的文件它会自己检查而scp 则是把所有的文件统一复制过去达到的是一个 统统覆盖的意义 纯命令 Chat- GPT-3.5 演示 rsync 是一个用于文件同步和备份的工具可以在本地或远程系统之间高效地进行文件的复制和同步。以下是 rsync 命令的基本用法示例以及一些常用选项 rsync [options] source destination 其中 source 表示源文件或目录的路径destination 表示目标文件或目录的路径。常用的选项包括 -a归档模式用于保持文件的属性、权限和时间等。 -v详细输出模式显示正在复制的文件和目录。 -r递归复制目录及其内容。 -z传输时压缩数据可以减少传输时间。 --delete删除目标中不存在于源的文件。 --exclude排除指定的文件或目录。 -e指定远程 shell 的路径通常用于远程传输。以下是一些示例 本地文件同步 rsync -av /path/to/source /path/to/destination本地目录同步 rsync -av /path/to/source/ /path/to/destination/从本地到远程服务器同步 rsync -av /path/to/source usernameremote_server:/path/to/destination从远程服务器到本地同步 rsync -av usernameremote_server:/path/to/source /path/to/destination同步时排除特定文件或目录 rsync -av --exclude*.log /path/to/source /path/to/destination使用压缩传输 rsync -avz /path/to/source /path/to/destination请注意rsync 的选项和用法非常丰富你可以根据需要进行组合和定制。在使用之前建议查阅相关文档或执行 man rsync 命令来获取更详细的信息和帮助。 脚本 脚本来自这位仁兄 https://blog.csdn.net/qq_63756815/article/details/127016471 1、在 /bin 目录下创建 xsync文件脚本 2、需要修改的是在 第二步修改为自己的主机名 3、修改 文件权限为 777也可以单加一个可执行权限x chmod 777 xsync 4、 #!/bin/bash#1. 判断参数个数 if [ $# -lt 1 ] thenecho Not Enough Arguement!exit; fi#2. 遍历集群所有机器这里记得修改为自己的集群主机名 for host in hadoop102 hadoop103 hadoop104 doecho $host #3. 遍历所有目录挨个发送for file in $do#4. 判断文件是否存在if [ -e $file ]then#5. 获取父目录pdir$(cd -P $(dirname $file); pwd)#6. 获取当前文件的名称fname$(basename $file)ssh $host mkdir -p $pdirrsync -av $pdir/$fname $host:$pdirelseecho $file does not exists!fidone done演示 脚本 [rootmaster bin]# xsync /opt/test/master sending incremental file listsent 97 bytes received 17 bytes 76.00 bytes/sec total size is 10 speedup is 0.09slave1 sending incremental file list test/ test/a1.txt test/a2.txtsent 200 bytes received 58 bytes 172.00 bytes/sec total size is 10 speedup is 0.04slave2 sending incremental file list test/ test/a1.txt test/a2.txtsent 200 bytes received 58 bytes 516.00 bytes/sec total size is 10 speedup is 0.04 纯命令: [rootmaster bin]# echo 2222 /opt/test/a2.txt [rootmaster bin]# rsync -av /opt/test/ slave1:/opt/test/ sending incremental file list a2.txtsent 137 bytes received 41 bytes 118.67 bytes/sec total size is 10 speedup is 0.06 这里 我专门试了试会不会自动给我创建目录因为我没学过脚本发现是会的 但是 如果是纯命令的话你必须和scp命令相同的语法就是绝对路径且只会复制文件
http://www.hkea.cn/news/14501848/

相关文章:

  • 唐山网站网站查询域名ip入口
  • 河南企业网站推广公司网页设计业务介绍
  • 网站地址跟网页地址区别域名备案查询最新消息
  • 找设计方案的网站泉州建设网站公司
  • 网站建设技能搜狗站长工具综合查询
  • 自己做qq头像静态的网站企迪网
  • 南京做网站建设的公司哪家好外包公司排名前十
  • 工作室装修网站源码凤山县住房和城乡建设局网站
  • 安乡网站制作wordpress手机版如何在电脑
  • 网站收录入口申请查询网站开发推荐一本书
  • linux网站开发软件金蝶软件官方报价
  • excel 表格 做的网站一站式推广平台
  • 长沙南站建站免费word文档模板下载网站
  • 苍溪网站建设流量精灵app
  • 网站设计说明范文深圳网站公司招聘信息
  • 如何网站建设 需要详细的步骤网站运营学习
  • 怎样用dw做网站主页软件开发工具也称为什么工具
  • 网站推广途径及要点网站开发策划个人简历
  • 网奇e游通旅游网站室内设计联盟官网论坛
  • 上海 国际网站设计佛山网站建设多少钱
  • 静态网站开发步骤网站建设用什么网站好一点
  • 网站建设中服务器搭建方式给帅哥做奴视频网站地址
  • 银川建立网站门户网站功能
  • 惠州地区网站建设公司wordpress图片放大滑动
  • 客户管理系统在哪进入vue做网站对seo
  • 广东官网网站建设平台惠州悦商做网站
  • 现在ui做的比较好的网站海外网站建设平台
  • 东营企业网站制作深圳网站建设前十名
  • 南桥做网站wordpress poststatus
  • 美食网站的建设重庆宣传片2023