Created
June 17, 2016 10:58
-
-
Save kingthrillgore/7b870c6348c10de4b1aca2b179897b9d to your computer and use it in GitHub Desktop.
Removes podcasts on my NAS based on how old they are
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
DIRECTORIES=("The Joe Rogan Experience" "The Adam Carolla Show" "Le rendezvous Tech" "Podcast Beyond" "Channel 33" "On Point with Tom Ashbrook Pod" "Security Now MP3" "The Nerdist" "Les Podcasts Gameblogfr" "The Game Informer Show" "Radical Personal Finance" "Giant Bombcast" "The Dave Ramsey Show" "The Clark Howard Podcast" "APM Marketplace" "Pardon My Take" "On the Media" "This Week in Google" "Le journal de 09h" "World Business News" "Business Daily" "BBC World Service Newshour" "On Point with Tom Ashbrook Pod" "The Starters" "Channel 33" "Tech News Today" "This Week in Tech MP3" "PRIs The World from BBCPRIWGBH"); | |
IFS="" | |
for i in ${DIRECTORIES[@]} | |
do | |
find "/media/corsac/Podcasts/$i" -mtime +30 -name "*.mp3" -exec rm {} \; | |
find "/media/corsac/Podcasts/$i" -mtime +30 -name "*.ogg" -exec rm {} \; | |
find "/media/corsac/Podcasts/$i" -mtime +30 -name "*.mov" -exec rm {} \; | |
find "/media/corsac/Podcasts/$i" -mtime +30 -name "*.mp4" -exec rm {} \; | |
find "/media/corsac/Podcasts/$i" -mtime +30 -name "*.m4a" -exec rm {} \; | |
find "/media/corsac/Podcasts/$i" -mtime +30 -name "*.m4v" -exec rm {} \; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment