Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (10) AWS (5) numerology (5)

Wednesday, March 1, 2017

Linux Query or Interview question - 2

Query 1. How to remove junk character (^c).

If we cancel/interrupt the command by pressing ctrl+c we may sometime get junk character like (^c). To remove it you have to put:

[root@testmachine ~]# stty -ctlecho

This is applicable to that particular putty session. If we take new session we may get junk character again. So we have to make the changes persistent by adding above entry in bash profile.

 [root@testmachine ~]# vi /etc/bashrc
stty -ctlecho

Query 2. How many fields are there in /etc/fstab.

[root@testmachine ~]# vi /etc/fstab
/dev/mapper/vgroot-lvvar /var                    ext4    defaults        1 2

        1. Device driver
2    2. Mountpoint name
3    3. FS type = ext4,ext3, swap etc..
      4. describes the mount options associated with the filesystem
5    5. fsck/dump
6    6. fsck/on/off sequence

Where fsck means filesystem check. Command e2fsck is enhaced fsck and it is enhanced version of fsck. The sixth field is very important which determine whether fsck need to be run or filesystem or not.

Once server gets rebooted at the time of mounting fs, it will check which FS need fsck to do.

0 = No auto fsck.
1= It is used for / mountpoint. 1st priority. The mountpoint which are having value 1 will be grouped together and system will run fsck on those moutpoints.

2= 2nd priority for fsck.


With Regards,
Kirann Jadhav

No comments:

Post a Comment