Deleting multiple files the easy way with MC: 2nd Part

A year ago I wrote an article where it showed how, search, select and delete multiple files using Midnight commander, or as many of us know it: MC.

In this other article we will do the same procedure (so we take advantage and refresh it), but I will show you how to filter, select and eliminate the results according to a specific criterion.

Let's go to trouble. We open a terminal and enter with MC to the device USB, which will be called FlashDriver, and will be mounted on /half for example:

$ mc /media/FlashDriver

Now let's Utilities »Find Files

We should get something like this:

and where does it say Archives we remove the * and we put the name of what we want to delete, for example .Thumbs, the hateful files generated by Windows.

We can of course use asterisks to filter the search, for example: * Thumbs o Thumbs *.

For the example images I used the word ubuntu. It should be noted that it will not be the same to search ubuntu that Ubuntu. The results are displayed as follows:

Now we mark the option: Take to panel

and as you can see in the image above, all the files found were placed in the left panel. Now with the key Insertion we are selecting everything. Then we press F8 already delete has been said.

So far what I showed in the old article, but we are going to expand it a little more, making it easier for us to erase. Let's say that I have searched for all the images that I have inside a folder that have the format . JPG. We get something like this:

mc-results The result returned a bunch of images that I don't need. Let's say that I only want to select to Delete, Move or Copy all the images that have the word in their name Android.

For this we go to the Superior Menu ( F9 ) »File» Select Group ( + )

mc-results1

We wrote * Android * with the asterisks:

mc-results2

And automatically all the files that meet this requirement are selected:

mc-results3

Now we can Delete, Move or Copy them. We can also do the Inverse Selection ( * ). And ready!


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

8 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Sandrux said

    Very good article! The only detail is that after "Bring to panel" and if you want to delete everything found, instead of selecting one by one with the Insert key, just press the * key and select everything in one go.
    regards

    1.    ezitoc said

      * only select files, not directories. To delete only directories, you can do the following: «+ Enter *»

      1.    ezitoc said

        Then F8 to clear the selection.

  2.   dhunter said

    Delete the recursive Thumbs.db in a directory: find ./ -name "Thumbs.db" -print0 | xargs -0 rm

    1.    elav said

      Someone always contributes the Find comment, the same happened with the previous post .. but come on, you'll tell me it's easier, if you use MC, or try to remember the command, with its pipes and others haha

  3.   Andres Martinez said

    Hello everyone, how do I enter irc from desdelinux.net?

    1.    elav said

      It is currently offline 🙁

  4.   Bruno cascio said

    Disabling "Distinguish may / min" is the option so that "ubuntu" is equal to "Ubuntu" (Case Sensitive)

    Greetings!