Wednesday, 23 November 2011

Interview Linux Question & Answers-PART 3


                                                Linux Questions

1.What is the permission for /tmp?
Answer:  rwxrwxrwt –(777 + sticky bit is set for temp dir)
2. What is the permission for /proc?
Ans: r-xr-xr-x =  555
3. What is the permission for /etc/shadow?
Ans:  -r------- = 400
4. What is the use of UID?

5. What is the difference between soft link and hard link? Whether it can be set for Directory?
Ans:  Hard link has the same inode number  where as a soft link as a diff inode number.
           Original file deleted in hard link can be reused using the link file where as in softlink  original file deleted then the link become dangling.
          Hard link can’t be set to directory whre as in softlink it is possible.
6.  How many alias ip address can be used for a single interface?
Answer:  254 IP Address
7. Explain crontab?
Ans:  Is used for automatic scheduling the job. 
 Min       Hours    DayofMonth      Month  Daysof Week
8. Write a crontab for taking backup of data for every 15min only during 10am to 5pm?
Ans: */15             10-17     *              *              *              /filepath
9. Explain the types of RAID?
RAID 0 Stripping , - Data is distributed to all the hard disk
 RAID 1 Mirroring , - uses 2 or more disks which each store same data.
RAID 5 Stripping with parity, - Storage capacity of the array reduced by one disk. It means data can be stored in one third portion , one portion for parity info.
10. You have 40GB*4 hard disk, configured with RAID 5, how much space you will get for storing data?
Ans:  120GB for DATA  and 40GB For parirty.
11. What is the output for mkdir –p {a,b,c}/{1,2,3}
Ans:  /a  /b  /c
          1    1   1
          2    2   2
          3    3   3
12. How do you delete a file which was modified before one hour?
Ans: find / -atime  +60 –exec  /bin/rm –rvf  {}  \; 
13. What is rsync?
Ans: rsync  is a replacement rcp. It is faster than scp and rcp. It compares the source and destination directory.
14. Where is the ip configuration file located?
Ans:  /etc/sysconfig/network-scripts/ifcfg-eth0
15 where is the apache config file located?
Ans: /etc/httpd/conf/httpd.conf
16. Where is the apache log file located?
Ans: /var/log/httpd/access.log    /var/log/httpd/error.log
17. Explain min requirements syntax for Name based configuration?
Ans:  <VirtualHost 97.158.253.26>
   servername www.my-site.com
   Directives for site #1
</VirtualHost>
18. How will you give the default home directory while creating users?
Ans: useradd    –d /var/user1   user1
19. Where will you change the default home directory for all?
Ans: /et                c/defaults/useradd
20. What is the port number for DHCP?
Ans: DHCP server: 67 client: 68
21. How will you find and delete the mail id which was not login for a month in qmail?
Ans: vuserinfo  –a   mailid
22. How will you take backup only databases schema?
23. How will you take backup only a particular table?
24. Which is best to use char (50) or varchar(50)?
25. How will you rename a database?




1 comment:

  1. I've just installed iStripper, so I can have the hottest virtual strippers on my taskbar.

    ReplyDelete