Ik I can use grep to find filenames with specific characters and then print that to a list but idk how to utilize said list to rename. I found another solution which’s using mv but couldn’t figure out how to make it work w subdirectories. I think using both grep and mv in unison’s the answer just idk how to do it. plz halp

  • zeppo@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    16 hours ago

    You can do that with the find command. Also xargs is a good one to know for stuff like this, but when commands have the capacity to work on a list already like find, you don’t need xargs. You can use find -exec rename -n with a regex perhaps. I’m not a linux system currently and can’t test a snippet, but I’ll check back later if the question is still open.

    • sinextitan@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      15 hours ago

      I’ll edit the post w the solution I find but as this can be done many ways, feel free to comment your solution.