I
I
IvanRobot2016-06-19 16:34:56
linux
IvanRobot, 2016-06-19 16:34:56

How to write a bash script to sort files in a directory?

Help me write a script that can remove duplicate files.
There is a set of images, you need to delete files with the same size. But you do not need to delete all such images, but only the following in the queue (in alphabetical order):

1.png    # 23,5 Kb
2.png    # 24,6 Kb
4.png    # 24,6 Kb > remove
8.png    # 24,6 Kb > remove
16.png   # 23,5 Kb

UPD: Got a response on unix.stackexchange.com

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Chudnovsky, 2016-06-19
@Frankenstine

For this very purpose it is better to use remove-duplicates from the recoverjpeg package.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question