S
S
Sergey2015-06-08 09:45:02
linux
Sergey, 2015-06-08 09:45:02

What is the correct way to find files from folders in linux using find, in the name of which there are only 2 characters?

Hey! Guys, there is a folder structure in the directory /00 /0a /0f /13 /19 /21 /2a /30 ....... /preview /logo /orig - you need to pull through find only jpeg files that are in folders, which contain only 2 characters.
Tried with find . * | grep -P "[A-Za-z0-9\-\/]\{2}*" and find -type f -regex ".*/[A-Za-z0-9\-\/]\{2 \}*"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konkase, 2015-06-08
@Konkase

find . -type f -name "??.jpeg"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question