Moving multiple files having spaces in name (Linux)

前端 未结 3 972
囚心锁ツ
囚心锁ツ 2020-12-04 03:13

I have a directory which contains multiple files with spaces in their names. I want to find a pattern in the name and those file will be moved to some other directory. Now t

3条回答
  •  执笔经年
    2020-12-04 03:42

    Working fine with following code

    find . -maxdepth 1 -name "*$pattern*xlsx" -type f -print0 | xargs -I{} -0 mv {} "$destination/"
    

提交回复
热议问题