Posts Tagged ‘ Linux ’

Creating RDM to LUN (SAN) mapping on VMware ESX 4, Vcenter.

August 6, 2010
By Andrew Lin

In the past I have written articles about how to create a RDM to LUN disk mapping for VMware ESX 3. http://www.gamescheat.ca/2009/10/scripts-to-automate-the-process-of-identifying-and-compiling-an-rdm-to-lun-mapping-list-for-vmware-esx-30/ and http://www.gamescheat.ca/2009/10/how-to-identify-and-compile-an-rdm-to-lun-mapping-list-for-vmware-esx-30/ The procedure to identify the path for the RDM (raw disk mapping) to LUN (disk on SAN) on Vmware ESX 4 is different from Vmware Esx 3. There are a...
Read more »

Tags: , ,
Posted in Hardware, Software | No Comments »

How to list the status of swap in Solaris

February 26, 2010
By Andrew Lin

List the status of all swap areas. # swap -l swapfile dev swaplo blocks free dev/dsk/c0t0d0s1 32,9 16 8425712 8425712 The output has five columns: path The path name for the swap area. dev The major/minor device number in decimal if it is a block special device; zeroes otherwise. swaplo The swaplow value for...
Read more »

Tags: , , ,
Posted in Software | 1 Comment »

Using grep/egrep to find out which file contains a word or string in Unix or Linux

February 2, 2010
By Andrew Lin

If you need to find out which file in a directory contains a specific word then the grep command is your friend. Here is an example, if you wanted to find out which file in the directory /home contains the word groundhog. grep –i “groundhog” /home/* /home/shadow:Today is groundhog day The –i option means...
Read more »

Tags: , , ,
Posted in Software | 4 Comments »

Success, failure of the tar command recorded with time and date stamp

January 27, 2010
By Andrew Lin

I needed to determine the amount of time it would take to archive large amount of data on my unix server. If I had infinite amount of free time I could sit in front of the screen with a stop watch. But the better way is to create a script that would record the...
Read more »

Tags: , , ,
Posted in Software | No Comments »

How to delete a file or directory with special characters using the inode in Unix or Linux

January 22, 2010
By Andrew Lin

My fat fingers inadvertently created a directory on my unix server with special characters. I could not access this directory nor could I delete it. When I listed the directory using the command ls –b, I could see all the funny characters. ls –b scritps010/010/010/010 I tried every command I could think of, rmdir...
Read more »

Tags: , , ,
Posted in Software | No Comments »

List files by size in reverse numerical order in Linux or Unix.

January 7, 2010
By Andrew Lin

The root drive on my Solaris server was full and I needed to find out what file was the largest. The du command can list the size of the files in a directory, you can then use the sort command to display the results in numerical order (by size). Below is an example of...
Read more »

Tags: , ,
Posted in Software | No Comments »

How to migrate users and groups from Solaris 9 to 10?

January 4, 2010
By Andrew Lin

I just installed Solaris 10 on a new SPARC server, now I need to migrate the userids and groups over. The optimal way to migrate the userids while retaining their password is to simply copy three files from the Solaris 9 server over to the new Solaris 10. The three files are /etc/passwd, /etc/shadow,...
Read more »

Tags: ,
Posted in Software | 1 Comment »

Strange message when launching the vi editor.

December 21, 2009
By Andrew Lin

I got this strange error message when launching the vi text editor during the installation of Solaris 10, I don’t know what kind of terminal you are on – all I have is ‘unknown’. The reason for this is becasue the terminal emulation has not been defined in your environment. To configure the terminal...
Read more »

Tags: ,
Posted in Software | No Comments »

Configure DNS client on Soalris 10 server to resolve telnet login delay

December 3, 2009
By Andrew Lin

I just installed and configure a new Sun SPARC Enterprise M3000 server. It seems that when I telnet to the sever from a remote computer it takes a while to connect and get a login prompt. Once I am able to login in, speed is not an issue. After some research I figured out...
Read more »

Tags: ,
Posted in Software | No Comments »

Forgot the root password for my Red Hat Enterprise Linux 5 server, how do I change it?

November 4, 2009
By Andrew Lin
Forgot the root password for my Red Hat Enterprise Linux 5 server, how do I change it?

I built this Red Hat Enterprise Linux 5 server in VMware a while ago and forgot the root password. I can log in as a user but it does not have the privileges to change the root IDs password. Well, fear not you can reboot the server into single user mode and change root’s...
Read more »

Tags: ,
Posted in Software | 1 Comment »