Posts Tagged ‘mp3’

Wipe all mp3s and avis from the filesystem


So you want to run a script that removes all mp3 and avi files off the filesystem. One way (in bash) as below. Comment, suggestions and feedback are welcome :) Using $EUID to check for root user, and $IFS to check for line breaks as the file names has spaces in them. IFS is saved to a temp variable, reset and then re-instated afterwards. C is the counter. Got two litte for loops in bash with backtick execution.