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 Flash Driver, 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 which 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:
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 ( + )
We wrote * Android * with the asterisks:
And automatically all the files that meet this requirement are selected:
Now we can Delete, Move or Copy them. We can also do the Inverse Selection ( * ). And ready!
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
* only select files, not directories. To delete only directories, you can do the following: «+ Enter *»
Then F8 to clear the selection.
Delete the recursive Thumbs.db in a directory:
find ./ -name "Thumbs.db" -print0 | xargs -0 rm
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
Hello everyone, how do I enter IRC? desdelinux.net?
It is currently offline 🙁
Disabling "Distinguish may / min" is the option so that "ubuntu" is equal to "Ubuntu" (Case Sensitive)
Greetings!