Oftentimes, you may need to just delete all messages in queue (for example, when your script has gone mad and generated too many messages to handle, once you’ve stopped postfix). It’s quite simple, really: (more…)
Tag: delete
-
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.