How can I recursively copy a directory into another and replace only the files that have not changed?

前端 未结 3 672
迷失自我
迷失自我 2021-02-02 12:00

I am looking to do a specific copy in Fedora.

I have two folders:

  • \'webroot\': holding ALL web files/images etc

  • \'export\': folder cont

3条回答
  •  面向向阳花
    2021-02-02 12:43

    1. -u overwrites existing files folder if the destination is older than source
    2. -p perserves the permission and dates
    3. -f turns off verbosity
    4. -r makes the copy recursive

    So looks like you got all the correct args to cp

提交回复
热议问题