Skip to content

Instantly share code, notes, and snippets.

@iguoli
Last active December 7, 2017 04:21
Show Gist options
  • Save iguoli/d8939eca93a568dbd28f212dc63369ae to your computer and use it in GitHub Desktop.
Save iguoli/d8939eca93a568dbd28f212dc63369ae to your computer and use it in GitHub Desktop.
Linux下文件批量重命名, Linux, rename, ls, sed, mv

Linux下文件批量重命名

使用rename命令

rename 被替换字符 替换字符 文件名

使用ls -1sed命令

ls -1 | sed "s/被替换字符\(保留字符\)/mv & 新字符\1/" | sh -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment