锡盟网站建设,滑县网站建设,四川省建设人才网站,互联网公司排名500强名单内容#xff1a;两台服务器#xff0c;one 和 two ,在one的指定目录下#xff0c;找到指定结尾的文件#xff0c;将这个文件移到two服务器的指定路径下#xff0c;同时将one的源文件 移到 其他目录下。
#!/bin/bash# 指定源路径
source_path/u01/isi/75_files_te…内容两台服务器one 和 two ,在one的指定目录下找到指定结尾的文件将这个文件移到two服务器的指定路径下同时将one的源文件 移到 其他目录下。
#!/bin/bash# 指定源路径
source_path/u01/isi/75_files_test# 指定目标服务器
target_server192.168.10.xxx
target_path/u01/isi/log# 指定备份文件夹
backup_path/u01/isi/log/back# 查找并推送文件
find $source_path -type f -name *.dat -exec sshpass -p 密码 scp -o StrictHostKeyCheckingno {} 账号$target_server:$target_path \; # 移动文件到备份路径
mv $source_path/*.dat $backup_path