Posted by: SiiN on: March 25, 2008
Enter the command:
strings `which php` | grep ./configure | sed s#”‘”#””#g
Posted by: SiiN on: December 3, 2007
and to convice the user
time wget -q <domainname>
Thank you Sari for the tip
Posted by: SiiN on: November 24, 2007
#!/bin/bash
hostname=`/bin/hostname`
MAIL_BODY=/tmp/googleblock.txt
#Give the email address(es) to which the script will have to send the alerts
MAIL_TO=some_addr@some_domain.com
send_mail()
{
cat $MAIL_BODY|mail -s ” Googlebot IP blocked on $hostname” $MAIL_TO
rm -f $MAIL_BODY
}
for i in `cat /etc/apf/deny_hosts.rules | grep -v “#” `
do
host $i | grep googlebot
if [ $? -eq 0 ]
then
echo $i >> $MAIL_BODY
fi
done
if [ [...]
Posted by: SiiN on: November 5, 2007
Ballu called me as he got this error:
Mounting proc filesystem Bad file descriptor
No such partition found …
Something modifed /dev/null to a regular file. To fix, login into repair mode, remount root filesystem as read-write, and restore /dev/null:
# mount -n -o remount,rw /
# rm -f /dev/null
# mknod -m 0666 /dev/null c 1 3
It worked. [...]
Posted by: SiiN on: November 5, 2007
There is no excerpt because this is a protected post.
Posted by: SiiN on: November 5, 2007
There is no excerpt because this is a protected post.
Posted by: SiiN on: October 31, 2007
There were some process running which were referring to the files in tmp, even though the files are deleted and that was causing the difference in output for df -h and du for /tmp
To kill those processes:
for i in `lsof | grep deleted | grep tmp |awk {‘print $2′}`; do kill -9 $i; [...]
Posted by: SiiN on: September 25, 2007
afilename=somefile.ext;
(echo “$afilename is attached” ; cat $afilename | uuencode $afilename) | mail -s “`echo $afilename`” youraddress@yourserver.com
Posted by: SiiN on: September 25, 2007
# redirect traffic coming in on port 26 to port 25
/sbin/iptables -t nat -I PREROUTING -p tcp –dport 26 -j REDIRECT –to-port 25
# make it so that this command runs on server boot up.
if ! grep -qai 26 /etc/rc.local; then
echo ‘/sbin/iptables -t nat -I PREROUTING -p tcp –dport 26 -j REDIRECT [...]
Posted by: SiiN on: September 24, 2007
You can order OpenSolaris Starter Kit for free at http://get.opensolaris.org/