开发者

Shell script to copy files

开发者 https://www.devze.com 2023-01-03 10:55 出处:网络
If there exist a directory, /backup/ And the files in it are a.gz b.gz c.gz And another directory /backup-directorybac开发者_如何学Gokup

If there exist a directory,

/backup/ And the files in it are a.gz b.gz c.gz

And another directory /backup-directorybac开发者_如何学Gokup And the files in it are a.gz

I need a shells script to compare two directories if the files are present then ignore it and if the filesare not present copy it to the destination directory

Thanks..


"rsync" command has it all


rsync -a /backup/ /backup-directorybackup/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号