Copy or rsync command

前端 未结 8 1333
广开言路
广开言路 2021-01-30 03:42

The following command is working as expected...

cp -ur /home/abc/* /mnt/windowsabc/

Does rsync has any advantage over it? Is there a better way

8条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-30 04:18

    Keep in mind that while transferring files internally on a machine i.e not network transfer, using the -z flag can have a massive difference in the time taken for the transfer.

    Transfer within same machine

    Case 1: With -z flag:
        TAR took: 9.48345208168
        Encryption took: 2.79352903366
        CP took = 5.07273387909
        Rsync took = 30.5113282204
    
    Case 2: Without the -z flag:
        TAR took: 10.7535531521
        Encryption took: 3.0386879921
        CP took = 4.85565590858
        Rsync took = 4.94515299797
    

提交回复
热议问题