I am using CentOS and I have downloaded several videos which due to the bad internet has corrupted duplicated files with names. I want to remove them.
the files are with
file1.mp4
file1.mp4.0
file2.mp4
file2.mp4.0
file2.mp4.1
file3.mp4
file3.mp4.0
file3.mp4.1
file3.mp4.2
I want to remove all with the .mp4.0
and .mp4.1
and so on duplicated extensions.
I tried
rm *{.mp4.0}
rm *.mp4.0
but files are still there. What is the missing command part which can make the problem solved.
The file has thousands of duplicated such files and the folder contains hundreds of thousands of files.
2
Answers
Since there are 2 ‘dynamic’ parts, you’ll need to use 2 wildcards
Using
rm
:Using
find