July 2012
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories

July 2012
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

How to make LiveCD detect and mount LVM partition?

 

Reestablish Volume Group

To tap into the volume group you wish to work with, make sure /etc/lvm/lvm.conf filters are able to see the /dev/md? devices, and execute the following:

[tempsrv] # vgscan

Reading all physical volumes. This may take a while…

Found volume group “rootvg” using metadata type lvm2

 

which should display the […]

Search and replace recursively on a directory in Linux

Search and replace recursively on a directory in Linux

ere is the small bash shell script to make life simple… This script can do a search for string and replace with a new string recursively in a directory.

——————————————————————————– #!/bin/bash # This script will search and replace all regular files for a string # supplied […]

List folders / directories by size in Linux / AIX / Windows

To list the directory sizes in kilo bytes and largest at the top

du -sk * | sort +0nr du -sk * | sort -nr

To list the directory sizes in Mega bytes and largest at the top du -sm * | sort +0nr du -sm * | sort -nr

To list the directory […]

How to forcefully unmount a Linux / AIX /Solaris disk partition?

Linux / UNIX will not allow you to unmount a device that is busy. There are many reasons for this (such as program accessing partition or open file) , but the most important one is to prevent data loss.

To find out the processes which are active on the partition.

[root@tempsrv ~]# lsof | grep […]

RPM Packages installation and usage

RPM Packages installation and usage RPM Packages installation and usage

Note:

Normal querying doesnot require a root loogin but for installation and uninstalling a package you need to be logged in as root. We can also use regular expressions or wiild-characters with the rpm command.

RPM PACKAGE INSTALLATION/ UNINSTALLATION:

# installing a rpm package with […]

About umask

About umask

umask command will be used for setting the default file creation permissions.

When a file is created, its permissions are set by default depending on the umask setting. This value is usually set for all users in /etc/profile and can be obtained by typing:

# umask

The default umask value is usually 022. […]

About SUID, SGID and Sticky bit

n addition to the basic permissions discussed above, there are also three bits of information defined for files in Linux:

* SUID or setuid: change user ID on execution. If setuid bit is set, when the file will be executed by a user, the process will have the same rights as the owner of the […]

Ethernet bonding in Linux

Bonding is creation of a single bonded interface by combining 2 or more ethernet interfaces. This helps in high availability and performance improvement.

Steps for bonding in Fedora Core and Redhat Linux

Step 1.

Create the file ifcfg-bond0 with the IP address, netmask and gateway. Shown below is my test bonding config file.

$ cat […]

tcpdump

Tcpdump is a really great tool for network security analyst; you can dump packets that flow within your networks into file for further analysis. With some filters you can capture only the interested packets, which it reduce the size of saved dump and further reduce loading and processing time of packets analysis.

Lets start with […]

Bash Shortcuts and Tips

Bash Shortcuts and Tips

Repeating an argument You can repeat the last argument of the previous command in multiple ways. Have a look at this example:

$ mkdir /path/to/dir $ cd !$

The second command might look a little strange, but it will just cd to /path/to/dir.

Some keyboard shortcuts for editing

There are some […]