therealims
asked on
Searching File Names and Eliminating Duplicates in Linux
I am looking for a way to search through a folder and have the system remove "duplicate" copies of files. For example, I may have the following files in my folder:
Movie1_SD_480p.mp4
Movie1_HD_720p.mp4
Movie1_HD_1080p.mp4
Movie1_HD_4k.mp4
I would like the script to keep the "Movie1_HD_4k.mp4" file but remove the rest. If the 4k file is not present, then I would like it to preserve "Movie1_HD_1080p.mp4" and so on. How would I write such a script using standard Linux commands?
Movie1_SD_480p.mp4
Movie1_HD_720p.mp4
Movie1_HD_1080p.mp4
Movie1_HD_4k.mp4
I would like the script to keep the "Movie1_HD_4k.mp4" file but remove the rest. If the 4k file is not present, then I would like it to preserve "Movie1_HD_1080p.mp4" and so on. How would I write such a script using standard Linux commands?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER