Showing posts with label linux programming. Show all posts
Showing posts with label linux programming. Show all posts

Unix/Linux programming interview

Question 1: What is the major advantage of a hash table? (Asked by Silicon Magic Corp. people)
Answer: The major advantage of a hash table is its speed. Because the hash function is to take a range of key values and transform them into index values in such a way that the key values are distributed randomly across all the indices of a hash table.
Question 2: What are the techniques that you use to handle the collisions in hash tables?(Asked by Silicon Magic Corp. people)
Answer: We can use two major techniques to handle the collisions. They are open addressing and separate chaining. In open addressing, data items that hash to a full array cell are placed in another cell in the array. In separate chaining, each array element consist of a linked list. All data items hashing to a given array index are inserted in that list.
Question 3: In Unix OS, what is the file server? (Asked by Silicon Magic Corp. people)
Answer: The file server is a machine that shares its disk storage and files with other machines on the network.
Question 4: What is NFS? What is its job?(Asked by Silicon Magic Corp. people)
Answer: NFS stands for Network File System. NFS enables filesystems physically residing on one computer system to be used by other computers in the network, appearing to users on the remote host as just another local disk.
Question 5: What is CVS? List some useful CVS commands.(Asked by Silicon Magic Corp.people)
Anser: CVS is Concurrent Version System. It is the front end to the RCS revision control system which extends the notion of revision control from a collection of files in a single directory to a hierarchical collection of directories consisting of revision controlled files. These directories and files can be combined together to form a software release.
There are some useful commands that are being used very often. They are
cvs checkout
cvs update
cvs add
cvs remove
cvs commit

for what daemon is responsible for in linux?

For what daemon is responsible for in linux?


Question: what daemon is responsible for in linux?
Ans: syslogd

The syslogd daemon is responsible for tracking  system information and saving it to specified log files.
Keywords:
daemon process in linux
linux daemon list
daemon etymology
linux daemon command
what is super daemon in linux
daemon process geeksforgeeks
daemon user in linux
where are daemons located in linux

command to find all of the files which have been accessed within the last 30 days in linux

Command to find all of the files which have been accessed within the last 30 days in linux


Question : command to find all of the files which have been accessed within the last 30 days?
Answer :find / -type f -atime -30 > December.files This command will find all the files under root, which is ‘/’, with file type is file. ‘-atime -30′ will give all the files accessed less than 30 days ago. And the output will put into a file call December.files.

Keywords:
how to find last 30 days files in linux
find files modified in last 2 days linux
linux find files modified in last hour
linux find files modified after a certain time
unix list files created between specific date and time
how to find files created on a specific date in unix
find files created in last 2 days
how to find files modified on a specific date in unix


What is LILO in Linux

What is LILO in linux?

Question :What is LILO in linux?
Answer :LILO stands for Linux boot loader. It will load the MBR, master boot record, into the memory, and tell the system which partition and hard drive to boot from.

Boot process:
When LILO loads itself, it displays the name LIO where each word specifies some actions
If it displays nothing then it does not load any part of LILO.
L: This is the first stage of the bootloader that has been loaded. If the process stops here it denotes that there were problems in the second stage. This may occur due to some incorrect disk parameter specified in the configuration file of lilo or some media problems also.
LI: It indicates that the second stage boot loader has been loaded and could not be executed. It can occur due to problems similar to L.
LIL: At this stage, the second stage boot loader has been completed in its execution. If it fails, this stage indicates that there were media problems or map file specified in the configuration file has some problems.
LIL?: This means that the second stage boot loader loaded at an incorrect address.
LIL-: This indicates that the descriptor table is corrupted.
LILO: All parts are successfully loaded.

Keywords:
installing lilo in linux
lilo in linux tutorialspoint
running lilo in linux
lilo boot loader download
lilo vs grub
grub in linux
lilo in linux in hindi
elilo linux


What is a Daemon?

What is a Daemon?

Question :What is a Daemon?
Answer :A daemon is a process that detaches itself from the terminal and runs, disconnected, in the background, waiting for requests and responding to them. It can also be defined as the background process that does not belong to a terminal session. Many system functions are commonly performed by daemons, including the sendmail daemon, which handles mail, and the NNTP daemon, which handles USENET news. Many other daemons may exist. Some of the most common daemons are: • init: Takes over the basic running of the system when the kernel has finished the boot process. • inetd: Responsible for starting network services that do not have their own stand-alone daemons. For example, inetd usually takes care of incoming rlogin, telnet, and ftp connections. • cron: Responsible for running repetitive tasks on a regular schedule.

Keywords: