0

I have route-eth1 file in /etc/sysconfig/network-scipts/. I need to exclude all the files except route-eth1 file during rsync ?

enter image description here

Heisenberg
  • 41
  • 1
  • 2
  • 8

1 Answers1

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