I have route-eth1 file in /etc/sysconfig/network-scipts/. I need to exclude all the files except route-eth1 file during rsync ?
Asked
Active
Viewed 398 times
1 Answers
2
You can check this answer, it seems pretty close to your problem : StackOverflow - rsync a specific file.
You can simply rsync directly the file by specifying the full path :
rsync avz /etc/sysconfig/network-scipts/route-eth1 root@<remote-ip>:/etc/sysconfig/network-scipts

Sofien
- 1,302
- 11
- 21
-
Cant I do like --exclude network* init* ifup* ifdown* ifcfg* for excluding other files ?? – Heisenberg Nov 12 '18 at 14:20