我不确定我是否正确理解,但至少可以提供一些帮助。
使用find和xargs的组合来操作文件列表。
find -maxdepth 1 -regex './[0-9]*' -print0 | xargs -0 -I'{}' mv "{}" "newdir/{}"
使用
-print0
-0
{}