BASH copy all files except one

后端 未结 8 588
逝去的感伤
逝去的感伤 2020-11-30 19:13

I would like to copy all files out of a dir except for one named Default.png. It seems that there are a number of ways to do this. What seems the most effective to you?

8条回答
  •  旧时难觅i
    2020-11-30 19:34

    This works great for copying everything except node modules. enjoy and thanks to the answers above I have just added on to it. Rsync is better in my opinion than CP as you can see progress bar without asking for it.

       rsync -av fromDirectory/ ToDirectory/ --exclude=node_modules
    

提交回复
热议问题