Welcome to my personal blog where i post photos, screenshots, tips, guides, activities, etc. Feel free to comment :)

HOWTO Delete Old Directory in UNIX

Thursday, July 8th, 2010

There are 2 ways u can do this. For example if u want to delete directory older than 7 days :

First method :

find /path/dir -type d -mtime +7 -exec rm -rf {} \;

Second method :

find /path/dir -type d -mtime +7 | xargs rm -rf {} \;

You can always change the +7 value to any number of days preferred.
FYI, this command is only for directory deletion, if u want to delete files, u can change the “-type d” (d means directory) to “-type f” (f means files).

Example :

find /path/dir/unl.txt -type f -mtime +7 | xargs rm -f {} \;

P/S : There’s an alternative command which we can use, tmpwatch (more info : http://linux.about.com/library/cmd/blcmdl8_tmpwatch.htm)

mod_dosevasive for Apache

Monday, June 21st, 2010

mod_dosevasive is an evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack. It is also designed to be a detection and network management tool, and can be easily configured to talk to ipchains, firewalls, routers, and etcetera. mod_dosevasive presently reports abuses via email and syslog facilities.

Detection is performed by creating an internal dynamic hash table of IP Addresses and URIs, and denying any single IP address from any of the following:
  • Requesting the same page more than a few times per second
  • Making more than 50 concurrent requests on the same child per second
  • Making any requests while temporarily blacklisted (on a blocking list)
This method has worked well in both single-server script attacks as well as distributed attacks, but just like other evasive tools, is only as useful to the point of bandwidth and processor consumption (e.g. the amount of bandwidth and processor required to receive/process/respond to invalid requests), which is why it’s a good idea to integrate this with your firewalls and routers for maximum protection.

Run Multiple Yahoo! Messenger (YM) on PC

Friday, May 22nd, 2009

doubleym

  1. Make sure Yahoo! Messenger is not running.
  2. Go to Start > Run, type “regedit” & click OK.
  3. Browse to HKEY_CURRENT_USER > Software > yahoo > Test
  4. Right click on the right hand windows,  choose New > DWORD.
  5. Rename the new entry NEW VALUE as Plural. Then double click the entry, change the default value from 0 to 1. Set the base as Decimal.
  6. Close Registry Editor.
  7. Voila! Now you can run Yahoo! Messenger on your PC.
Get Adobe Flash playerPlugin by wpburn.com wordpress themes