I know the exclude option in rsync can only accept relative paths, so I though I can make workaround with
$ls /usr/local/bin cppman demangle e fusuma rem triangle $realpath --relative-to=$PWD /usr/local/bin/cppman ../../usr/local/bin/cppman $rsync -va --delete --exclude=$(realpath --relative-to=$PWD /usr/local/bin/cppman) /usr/local/bin /home/user1/Desktop/transport/ created directory /home/shepherd/Desktop/transport bin/ bin/cppman bin/demangle bin/e bin/fusuma bin/rem bin/triangle sent 26,689 bytes received 189 bytes 53,756.00 bytes/sec total size is 26,215 speedup is 0.98
As you can see the file
cppman is not excluded, despite being relative. Why?