Posts

Showing posts from 2011

Using tar to compress folders in Unix

To compress : tar -cf pictures.tar pics/; gzip pictures.tar Or if you want to combine the gzip and the tar creation in one command: tar -czf pictures.tar.gz pics/ To decompress : gunzip pictures.tar.gz; tar -xvf pictures.tar

Compiling The Linux Kernel

Image
Dependencies To compile Linux Kernel the following are required to be installed. gcc latest version, ncurses development package and system packages should be up-to date To install the dependencies run the following commands in terminal and type the password for the user, when prompted. For gcc $ sudo apt-get install gcc For ncurses development package $ sudo apt-get install libncurses5-dev After installing the above packages then update your system by running the following command Update To download the latest kernel go to kernel.org  and download the latest stable version. Once the download complete move to the directory where you have downloaded the kernel package “ linux-3.1.5.tar.bz2 “. Now extract the tar file to the location “ /usr/src/ “. To move to the directory, for example if the downloaded package is in your Downloads directory. Use the below command. $ cd Downloads/ To extract the tar file run the following command. Type the password f

Zipping A Directory In Linux

Zip is a compression and file packaging utility for Unix. This utility is installed by default on most Linux computers. he program is useful for packaging a set of files for distribution; for archiving files; and for saving disk space by temporarily compressing unused files or directories. To zip directory called MyDir in your home directory (/home/MyDir), type the following command: $ zip -r mydir.zip /home/MyDir

SSH login without password

SSH login without password Aim: You want to use Linux and OpenSSH to automize your tasks. Therefore you need an  automatic  login from host A / user a to Host B / user b. You don't want to enter any passwords, because you want to call  ssh  from a within a shell script. How to do it: First log in on A as user a and generate a pair of authentication keys. Do not enter a passphrase: a@A:~> ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/a/.ssh/id_rsa): Created directory '/home/a/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/a/.ssh/id_rsa. Your public key has been saved in /home/a/.ssh/id_rsa.pub. The key fingerprint is: 3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A Now use  ssh  to create a directory  ~/.ssh  as user b on B. (The directory may already exist, which is fine): a@A:~> ssh b@B mkdir -p .ssh b@B's pa

Configuring iSCSI Volume in Ubuntu/Linux

The other day i got  Dell  EqualLogic  PS6000  Series SAN box to experiment on.  For windows it was pretty straight forward using the iSCSI tool present in administrative tools.  I wanted to try it on Linux so i searched a bit and at last formatted & mounted it on Ubuntu. Here are the steps that i followed. Follow the steps to configure iSCSI volume on ubuntu (i tried on 11.10): 1)  You need to install open-iscsi package :       #sudo apt-get install open-iscsi 2) Now you need to run discovery agains t the iscsi host:       # iscsiadm -m discovery -t sendtargets -p <iscsi server ip address> eg: If 192.168.11.110 is the ip address of iscsi server       # iscsiadm -m discovery -t sendtargets -p 192.168.1.110 OR       # iscsiadm --mode discovery --type sendtargets --portal 192.168.11.110 3)  Note down the record id (such as iqn.xxxxxxxxxxxxx:test) found by the discovery. You need the                same for login. Login, must use a n

Windows 7 Indexing Option

Image
The built-in search feature in Windows 7 is significantly better than the horrible search options in Windows XP. Instead of installing a third-party program like Google Desktop to search for files on inside files on your computer, you can now do it with easily from Windows 7. For example, let’s say your a programmer or web developer and you want to be able to search your code files like .aspx, .html, .java, .php, etc. With Windows 7, you can configure the search indexer to not only index any file you want, but also to index the file contents. By default, the Search Indexer in Windows 7 indexes the most common locations where your files would be stored, i.e. all libraries, everything in your User folder, and e-mail. If this is not enough, you can add or remove index location really easily. That means you can tell Windows 7 to index and return results from files and folder on network drives or external hard drives. To get started , click on  Start , then type in search  into the

Enable “Show Folder And Search Option” In Windows 7

Image
In Windows, NoFolderOptions policy hides the folder options from control panel and even disables the Show Folder and Search options from the command under  Tools  Menu in Windows Explorer. If your computer is not a part of an office environment or any other organizational network than you might be having a risk of a virus which disables these options as a part of infection. This policy in the registry also hides the file extensions to known file types so that the virus may infect your system in stealth. To enable this option, follow these simple steps. The Show Folder And Search Option is grayed out like this: To enable it follow one of these methods, it is always advisable to backup your registry before making any changes. Using Registry Editor Click  Start  menu button and type  regedit  in the Search bar. If User Access Control window pops up to ask for permission, click  Continue . When  Regedit.exe  is launched navigate to: HKEY_LOCAL_MACHINE \ Software \ Microsoft

How To Make Backup Of Your Registry In Windows 7

Image
Did you ever forget to make the backup of the registry before making some changes in it, which led to system crash? Every time you need to make changes to your registry, you should make a backup as a precaution. Making a backup is very important and helps the user when he wants to restore the changes he made. Exporting – Making A Backup In order to backup your registry, follow  these simple steps: In Windows 7 / Vista:  Open  Start  menu, type  regedit  in  Start Search  and click  OK . In Windows XP:  Open  Start  menu, click  Run,  type  regedit  and select  OK. In Registry Editor go to the  File Menu  and select  Export. Under the export range select  All. Put an  appropriate file name  and save as file type  Registration Files (*.reg). Importing – Restoring The Registry In Registry Editor go to the  File Menu  and select  Import. Now select the registry file(backup) that you made(using above procedure) and it will recover your settings that were