Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-3 of 3 total  RSS 

Old Ensim backup scripts

backup

#!/bin/sh

echo $1
cd /home/virtual/$1/var/www
tar czfv /home/backups/$1.tar.gz cgi-bin html > /dev/null
chmod 777 /home/backups/$1.tar.gz
echo Backed up $1 to /home/backups/$1.tar.gz


backup-all

#!/bin/sh

rm -f /home/backups/old/*
mv /home/backups/*.gz /home/backups/old/
find -type l -maxdepth 1 -name '*.*' | xargs -n 1 basename | xargs -n 1 ./backup

Get a list of big files on an Ensim shared hosting server

Go to /home/virtual and run:

find -type l -maxdepth 1 -name '*.*' | xargs -n 1 basename | xargs -i find /home/virtual/{}/var/www -type f -size +8192k -ls

Getting rid of domain transfer limitations in all zone files on Ensim

An inelegant use of find and grep, but it works.

find . | grep -e "zone" | xargs perl -pi -e 's/allow-transfer {.+?}\;//'
« Newer Snippets
Older Snippets »
Showing 1-3 of 3 total  RSS