S
S
Sergey Burduzha2017-08-11 12:08:56
bash
Sergey Burduzha, 2017-08-11 12:08:56

How to copy files using regular expression?

There are two folders.
dir1
1.mp4
2.mp4
3.mp4
9.mp4 only
need to copy 1,2,3 file to dir2
cp dir1/[1-3].mp4 dir2 - doesn't work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Movchan, 2017-08-11
@serii81

cp dir1/{1,2,3}.mp4 dir2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question