M
M
mrAibo2015-12-01 12:06:48
linux
mrAibo, 2015-12-01 12:06:48

How to find specific files via ls or find?

Good time of the day,
there is such a problem:
in various directories there are files like

archint.ini.PRIM
archint.ini.PRIM.ерунда
archint.ini.PRIM.еру.нда

How can I formulate a command so that only files are shown
archint.ini.PRIM
?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Aves, 2015-12-01
@mrAibo

find -regex '.*archint\.ini\.[^.]+'

A
Anatoly Medvedev, 2015-12-01
@balamyt92

Correct answer (mark it as correct answer using the button below)
find -name archint.ini.*

A
Anton Chernousov, 2015-12-01
@tech22

find ./ -name archint.ini.PRIM

M
mrAibo, 2015-12-01
@mrAibo

There they can be different - endings. PRIM is an example. Anything can be written there.
This is what I encountered. Moreover, the bill goes to hundreds of files in various directories. At worst, I will do frep -v according to old, backup. The worst thing is that old files cannot be touched.

archint.ini.NDT_C
archint.ini.NDT_C.old.12.05
archint.ini.NCP_PB*.backup
archint.ini.NCP_PB
archint.ini.NCP_PB.old
archint.ini.NDP_MA
archint.ini.NDP_MA*.backup
archint.ini.FCP_X.backp
archint.ini.FCP_X
archint.ini.FCP_BA_OA.backup
archint.ini.FCP_BA_OA
archint.ini.HBT_Z
archint.ini.HBT_Z.backup
archint.ini.HBT_A.backup
archint.ini.HBT_A.11.06.2014
archint.ini.HBT_A
archint.ini.FCP_P
archint.ini.FCP_P.6.5.12
archint.ini.FCP_P.backup

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question