Answer the question
In order to leave comments, you need to log in
How to create a regular search for files with 3 to 5 characters in their names?
I need to write a regular expression to find all files in a directory whose name contains from 3 to 5 any characters, without taking into account the names of the directories in which these files are located.
Answer the question
In order to leave comments, you need to log in
This crap will find all jpg files with names from three to five characters.
find . -type f -regextype sed -regex ".*/[A-Za-z0-9]\{3,5\}\.jpg"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question