So as most of you know, if you're like me and run a no-bans white-list server where ALL mods are enabled. You run into an issue where you're overloaded with Mystcraft Ages, and RFTools dimensions.
Sometime ago I began looking for something to manage this, and I've yet to be able to find an in-game solution other than RFTools commands, and asking people, "Who owns X dimension". You can imagine how that went.
So, after a chat with someone on my server awhile back he said, "Why don't you do it in linux" and I thought that's a brilliant idea.
I want to prefix this with I'M NOT A SHELL SCRIPTER, I know enough commands to get me by in a server environment. So if you take these commands, or any from anyone else who wishes to share here, we are not responsible for you breaking your server. Do your research!
So far what I've got is this one nifty little command:
Of course this command is executed in the minecraft root directory. But this generates a list of files which haven't been modified in 30 days, hence the mtime command. BUT, you can pipe it to grep and pull ONLY dimension folders like so:
So, for now this is what I'm doing, but I'm working on a shell script that I hope to have finished before Monday to do the following:
Sometime ago I began looking for something to manage this, and I've yet to be able to find an in-game solution other than RFTools commands, and asking people, "Who owns X dimension". You can imagine how that went.
So, after a chat with someone on my server awhile back he said, "Why don't you do it in linux" and I thought that's a brilliant idea.
I want to prefix this with I'M NOT A SHELL SCRIPTER, I know enough commands to get me by in a server environment. So if you take these commands, or any from anyone else who wishes to share here, we are not responsible for you breaking your server. Do your research!
So far what I've got is this one nifty little command:
Code:
find world/* -maxdepth 0 -type d -mtime +30
Of course this command is executed in the minecraft root directory. But this generates a list of files which haven't been modified in 30 days, hence the mtime command. BUT, you can pipe it to grep and pull ONLY dimension folders like so:
Code:
find world/* -maxdepth 0 -type d -mtime +30 | grep DIM
So, for now this is what I'm doing, but I'm working on a shell script that I hope to have finished before Monday to do the following:
- Find dimensions ( and RF dimensions ) which are more than X number of days old
- Generate a report and 'maybe' email the admin
- Delete said dimensions