Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 8
    Can you show us what you've tried, please. It also depends on the version of rename you're using - if you type rename just by itself what error message does it give you? Commented Feb 24, 2020 at 12:35
  • 2
    For example, rename 's/^.*(.{44}\.xml$)/$1/' 3*.xml works perfectly here Commented Feb 24, 2020 at 12:39
  • 4
    renames are legion. In different distros they may be differently... named. :) Commented Feb 24, 2020 at 12:43
  • I'm executing these commands on an AWS EC2 (Amazon Linux AMI) and executing the example sent by @roaima outputs a 'not enough arguments' error. Also, typing rename by itself also outputs 'not enough arguments'. Commented Feb 24, 2020 at 12:52
  • 5
    Yep, that's the util-linux rename, you are looking for perl-rename or prename. By the way, please don't post images of text. Instead, paste the text directly into your question and use the formatting tools to format it as code. Commented Feb 24, 2020 at 13:06