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)

The Power of Virtualization

Tuesday, July 6th, 2010

Running Ubuntu 10.04 & Fedora 12 on Mac OSX Snow Leopard via Parallels Desktop. Cool huh~!

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.

Speed Up Connection to ProFTPD server

Tuesday, June 15th, 2010

Open the config file (/usr/local/etc/proftpd.conf)

add these lines into the config

<Global>
IdentLookups                    off
</Global>
UseReverseDNS off

and restart your proFTPd services. Tadaa~!

Ubuntu 9.10 – Karmic Koala

Thursday, November 19th, 2009
Ubuntu 9.10 - Karmic Koala running on Snow Leopard Parallels Desktop

Ubuntu 9.10 - Karmic Koala running on Snow Leopard Parallels Desktop

Fedora 12 – Constantine

Thursday, November 19th, 2009
Fedora 12 - Constantine running on Snow Leopard Parallels Desktop

Fedora 12 - Constantine running on Snow Leopard Parallels Desktop

uname -a

Friday, March 13th, 2009

Darwin Mohd-NeoTech 9.4.1 Darwin Kernel Version 9.4.1: Mon Dec 8 20:59:30 PST 2008; root:xnu-1228.7.37~4/RELEASE_ARM_S5L8900X iPhone1,1 arm M68AP Darwin

FreeBSD 7.1-RELEASE Released!

Tuesday, January 6th, 2009

The FreeBSD Release Engineering Team is pleased to announce the availability of FreeBSD 7.1-RELEASE. This is the second release from the 7-STABLE branch which improves on the functionality of FreeBSD 7.0 and introduces some new features. Some of the highlights:

  • The ULE scheduler is now the default in GENERIC kernels for amd64 and i386 architectures. The ULE scheduler significantly improves performance on multicore systems for many workloads.
  • Support for using DTrace inside the kernel has been imported from OpenSolaris. DTrace is a comprehensive dynamic tracing framework.
  • A new and much-improved NFS Lock Manager (NLM) client.
  • Boot loader changes allow, among other things, booting from USB devices and booting from GPT-labeled devices.
  • The cpuset(2) system call and cpuset(1) command have been added, providing an API for thread to CPU binding and CPU resource grouping and assignment.
  • KDE updated to 3.5.10, GNOME updated to 2.22.3.
  • DVD-sized media for the amd64 and i386 architectures

For a complete list of new features and known problems, please see the online release notes and errata list, available at:

For more information about FreeBSD release engineering activities, please see:
http://www.FreeBSD.org/releng/

HOWTO Change Server Date

Sunday, January 4th, 2009

To check current date
date

Command to change date
date yymmddhhss

Where :
yy : Year in two digit
mm : Month (1-12)
dd : Day (1-31)
hh : Hours (0..23)
ss : Seconds

Example (to set date to 23/12/2008 11:08:00 hrs) :
date 0812231108

What To Do: Users Still Wants Telnet

Tuesday, August 26th, 2008

TELNET (TELecommunication NETwork) is a network protocol used on the Internet or local area network (LAN) connections. It was developed in late 60s with RFC 15. Telnet is pretty old for login into remote system and it has serious security problem. Most admins will recommend using Open SSH (secure shell) for all remote activities. But you may find users who are still demanding telnet over ssh as they are comfortable with Telnet. Some users got scripts written in 90s and they don’t want to change it. So what do you do when users demands telnet?

Read more: What To Do: Users Still Wants Telnet

Tell us how we’re doing:: Please answer a few questions about your experience to help us improve nixCraft.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes