Featured Post

Integrating Zend Framework 2.x with Doctrine 2.x ORM

Today I would like to present Doctrine 2 ORM integration with Zend Framework 2. I had some problems with this, so I would like to share the solution for my issues. Downloading sample project First of all you need to download example ZF2 project. We have two example projects created by Zend Framework...

Read More

How to copy many files with certain mask under Linux?

Posted by evolic | Posted in No category | Posted on 01-08-2013


This time I would like to share solution for the problem described in the title of this post: how to copy many files with certain mask under the Linux Operating System.


Let’s say I have 200 files with following types:

  • <number>_400x300.<extension> – e.g. 534_400x300.jpeg,
  • <number>_300x90.<extension> – e.g. 342_300x90.jpg,
  • <number>_640x480.<extension> – e.g. 11_640x480.png

As you could notice – there can be JPG, JPEG and PNG files.

I want to copy all files of the specified type, 300×90 for instance.


It is quite simple when we are using regular expressions!

Here is sample command we can type (or paste) in Linux shell:

That is all for today.

Write a comment