hello need help for create what I believe should be a simple script...
I am using both lmde and mac os x (need it for ipad ans apple tv...) and I recently messed up my itunes library by duplicating tons of songs !
I need a script to look in a folder for every files ending by 1.mp3 (duplicate) and 1.aac in that folder and subfolders and to delete them.
Thank you in advance for your help
help for simple script
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
help for simple script
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: help for simple script
Might find something in the sandbox here . . http://bashscripts.org/forum/viewforum.php?f=7
Re: help for simple script
You can do this with the find command
Use this to see which files will be deleted:
If the output of the above command looks right, use this to delete them:
Use this to see which files will be deleted:
Code: Select all
find /path/to/music_folder -type f \( -iname "*1.mp3" -o -iname "*1.aac" \) -print
Code: Select all
find /path/to/music_folder -type f \( -iname "*1.mp3" -o -iname "*1.aac" \) -delete