How can I use xargs to copy files that have spaces and quotes in their names?

后端 未结 22 1055
春和景丽
春和景丽 2020-12-02 03:49

I\'m trying to copy a bunch of files below a directory and a number of the files have spaces and single-quotes in their names. When I try to string together find

22条回答
  •  無奈伤痛
    2020-12-02 04:31

    find . -print0 | grep --null 'FooBar' | xargs -0 ...

    I don't know about whether grep supports --null, nor whether xargs supports -0, on Leopard, but on GNU it's all good.

提交回复
热议问题