find . -type f -name '【xxxxxxxxxx】*.*' -print0 | xargs -0 rename -e 's/【xxxxxxxxxx】//'
https://shapeshed.com/unix-xargs/
how-to-batch-rename-files-in-a-macos-terminal
make-xargs-handle-filenames-that-contain-spaces
how-to-rename-multiple-files-using-find
xargs-command-examples
find-a-pattern-in-files-and-rename-them
-print0
True; print the full file name on the standard output, followed by a null character (instead of the newline character that -print uses). This allows file names that contain newlines or other types of white space to be correctly interpreted by programs that process the find output. This option corresponds to the -0 option of xargs.
find . -type f \( -name "*.java" -o -name "*.xml" -o -name "*.html" \)
没有评论:
发表评论