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

    • Jo Miran@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      4 months ago

      My guess is that he was doing a “find . | grep filename”, which is a way to output a list of all occurrences within that directory structure, hence why they mentioned grep.

      • sinextitan@lemmy.worlddeleted by creatorOP
        link
        fedilink
        arrow-up
        0
        ·
        4 months ago

        exactly what I did. I also didn’t know the existence of rename. how would I go abt using it alongside find?

        edit: wrong cmd mentioned

        • zeppo@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 months ago

          I’ve never really used rename. It has different features compared to mv, though. rename has more options for batch renaming such as regular expression support, though the behavior varies by distro.