V
V
VN2021-01-02 18:49:09
linux
VN, 2021-01-02 18:49:09

How to select a file by an unknown part of the name?

There are files

doc_check_6971288836.file
doc_check_55463914.file

You need to select such files, the number part of which can be of different lengths, and the numbers are always different and are not known in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AVKor, 2021-01-02
@kavabangaungava

ls | grep -E 'doc_check_[0-9]+.file'

N
Nikolay Savelyev, 2021-01-02
@AgentSmith

ls -la doc_check_*.file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question