Using regex with `rename` version from `util-linux`

后端 未结 2 759
温柔的废话
温柔的废话 2021-01-05 00:25

I’m using a GNU/Linux distribution where the utility rename comes from util-linux and I want to make full use of regular (Perl or POSIX) expression

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-05 01:16

    Here is the manual page: http://linux.die.net/man/1/rename. It is pretty straightforward:

    rename from to file...

    rename will rename the specified files by replacing the first occurrence of from in their name by to.

    I believe there are no regexes, it is just plain substring match.

提交回复
热议问题