Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将具有此模式的所有文件重命名-512-到-256-文件夹中?我怎么能用 mv 做到这一点?我知道我必须使用xargs它并将其传递给find但不知道如何告诉 xargs
-512-
-256-
xargs
find
find . -name *-512-*
和
xargs mv ?????
for i in *-512-*; do mv "$i" "${i/-512-/-256-}"; done
我知道你问过mv,但这似乎更像是renameimo 的工作:
mv
rename
rename 's/-512-/-256-/' *-512-*