MC (Midnight Commander) is a powerful tool created by Miguel de Icaza (yes, the same creator of Gnome) which has multiple functions. In this article I comment on one of them.
It turns out that a friend turned to me because his memory was full of viruses. Inside the memory he had more than 30 folders with subfolders and in each one of them, the virus had left a self-executing file and according to him every time he deleted them, they came out again.
Can you imagine deleting each file folder by folder? We know that there are other ways to search for files on the console and delete what we want, but the idea is to do it more easily. That is why we make use of MC. This application does not come by default in almost any distro (a real shame) so we have to install it first.
We open a terminal and enter with MC to the device USB, which will be called Flash Driver, 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.
very useful when you know what files to delete lol…. What is the happy thumps for? I always see it and erase it but still ... thanks for the tip
The thumbs.db file is a cache to generate thumbnail views of images in Windows and its size does not have to be recalculated every time the user opens the directory that contains them.
Something easier ...
IFS = »
»
for file in $ (find -name "* .exe"); do rm $ file; done
We change "* .exe" for the pattern of the file 😛
Excellent tip .. 😀
MC I love this little program and I did not know its creator 😀
MC is the best, I have been using it for almost 4 years and for me it has no equal! Although it bothers me that the [repository] should not compile the salao plugin to connect to samba shares ...
This little tool is phenomenal and ever since I found it I have always used it. It's a very nice way to work in the terminal; by the way, if someone of you used MS-DOS, you will know that there was also a similar application, called Norton Comander and like MC it is fantastic.
What memories !! When I met the Norton Commander it was like being born again, ha! I am already installing the MC.