Backup disk partition tables

Backup disk partition tables

In storage environment, the file system reliability is almost a common issue. As for my understanding, when a ext3 file system is under use, its integrity is keeping broken day by day, as most of the threaded applicatons cannot take fully control of data blocks. After a long time running, fsck becomes [...]
Find dead softlink files by shell

Find dead softlink files by shell

Symbolic linked files are commonly used in Linux system. For example some service inital scripts are stored in /etc/init.d and linked to /etc/rc0.d, /etc/rc1.d, /etc/rc2.d, /etc/rc3.d, /etc/rc4.d, /etc/rc5.d and /etc/rc6.d, so that the system is able to control related services in different runlevel. (function(d, [...]
Apache SetEnvIf user’s guide

Apache SetEnvIf user’s guide

The mod_setenvif module allows you to set environment variables according to whether different aspects of the request match regular expressions you specify. These environment variables can be used by other parts of the server to make decisions about actions to be taken. The SetEnvIf directive defines [...]
Using stat command to display file status

Using stat command to display file status

The stat command can be use to check file status ( like file properties on Windows platform) or check the file system status on Linux. It comes from GNU Coreutils package. (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); [...]
How to use Perl to check mount point?

How to use Perl to check mount point?

This is a Perl module that was posted in a comment by our friend Justy (a.k.a. the iSheep), it solves a problem that I’ve faced a lot, especially with Perl scripts that run as daemons, where you need to copy files to a mount point. but if the mount point has failed then you’re just copying the files [...]
Something about VLAN you should know

Something about VLAN you should know

What is a VLAN A VLAN is a virtual LAN, it is a broadcast domain created by switches. Normally, it is a router creating that broadcast domain. With VLAN’s, a switch can create the broadcast domain. This works by, you, the administrator, putting some switch ports in a VLAN other than 1, the default [...]
Query IP whois info in python

Query IP whois info in python

This is a simple python script  based on some former rwhois code. It shows us an easy way on how to get detailed information about a specific IP address: joseph@e54:~$ python ip-whois.py 94.75.214.11 ====== whois.arin.net OrgName: RIPE Network Coordination Centre OrgID: [...]
Generate MAC Address by Scripts

Generate MAC Address by Scripts

In virtualized environment, we sometimes need to generate MAC address for each virtual machine at the time of creation. Since is a nearly unlimited amount of numbers on the same subnet, it is almost impossible that we would get the same MAC address. In the follwing paragraph, we’ll show you how [...]
List keys that of same values from a Perl Hash

List keys that of same values from a Perl Hash

Suppose that we have a hash like this: my %thehash = ( "abc" => {'a', 'office', '123'}, "cax" => {'s', 'domain', '254'}, "adm" => {'s', 'atwork', '254'}, "tec" => {'s', 'domain', '294'}, "ued" => {'s', 'domain', '254'} ); (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; [...]
Deal with readonly variables in bash

Deal with readonly variables in bash

As we know there’s a kind of read-only variables in bash in common linux system, typically $BASH_COMPLETION and $BASH_COMPLETION_DIR are both readonly variables. This post will focus on the following two topics, how can we set readonly variables in Bash, and how can we unset them. (function(d, [...]
© 2006-2007 Admon Home. All rights reserved.