Current time: 07-16-2025, 02:09 PM Hello There, Guest! (LoginRegister)


Post Reply 
[Shell] Größe der Webseiten ermitteln
Author Message
DiXeoN Offline
Member
***

Posts: 284
Joined: Feb 2008
Reputation: 2
Post: #2
RE: [Shell] Größe der Webseiten ermitteln
English translation:

Every month I want to see how much size the hosted sites use. To make it easier for me to do this, I use the following script and leave it by the monthly cron run.
Code:
pico /root/bin/webfoldersize
Code:
#!/bin/bash

FOLDER="/var/www/virtual/"

echo "Size of the websites"
echo "============="
du -s $FOLDER/*|sed "s#$FOLDER##g"|sort -gr;
echo ""
echo ""
Code:
chmod +x /root/bin/webfoldersize

Do the following for the crontab part:
Code:
crontab -e
Code:
0       0       1 * * /root/bin/webfoldersize | mail -s "[CompanyName] Site-Stats" "your@mailadress.here" >/dev/null 2>&1

I corrected something in the crontab part as good as i could, as i didnt quite understand Gisele, but I think it looks pretty well Smile

Anyways, pretty nice script, gotta try it out someday.
04-23-2009 04:34 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [Shell] Größe der Webseiten ermitteln - DiXeoN - 04-23-2009 04:34 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)