Showing posts with label unix. Show all posts
Showing posts with label unix. Show all posts

Unix Admin interview Questions

Unix Admin interview Questions
1. How do you list the files in an UNIX directory while also showing hidden files?
2. How do you execute a UNIX command in the background?
3. What UNIX command will control the default file permissions when files are created?
4. Explain the read, write, and execute permissions on a UNIX directory.
5. What is the difference between a soft link and a hard link?
6. Give the command to display space usage on the UNIX file system.
7. Explain iostat, vmstat and netstat.
8. How would you change all occurrences of a value using VI?
9. Give two UNIX kernel parameters that effect an Oracle install
10. Briefly, how do you install Oracle software on UNIX.

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

Unix interview Questions,Unix interview faqs

Unix interview Questions,Unix interview faqs
What is pid ?
What does a process mean ?
Explain UNIX System Kernel ?
What is a zombie ?
Explain ‘UNIX is a portable os' ?
What is the difference between a soft link and
WHAT is kernel ?
What happens when you execute a command ?
WHAT is the use of "fg" command ?
What is iostat ?
What is IPC ?
What is the procedure of "at" and crontab" commands ?
What are threads ?
What does the “route” command do ?
What is Fork swap ?
How do you remove a crontab file ?
How to recover a system whose root password has lost ?
What is a FIFO ?
How do you execute one program from within another ?
How to create hardlinks and softlinks on files ?
What is the difference between physical addresses
What is an inode ?
What is the significance of "su" command ?
How to list only the directories inside a directory ?
WHAT is the very first process created by kernel ?
What are Profilers ?
What is the command to edit contents of the file ?
What are the main families of threads ?
What is tar command ?
Which command is used to stop a running process in UNIX ?
How to view the hidden files in /etc directory ?
What is egrep ?
What is the command that will make the file "run.sh" executable ?
What is the use of uniq command ?
WHAT is the use of wild cards ?
What are default permissions for others in a file ?
What is netstat ?
Explain fork () system call ?
What is a Map ?
What do you understand by 'building block primitive' ?
What is 'inode' ?
What is a Daemon ?
What are the UNIX system calls for I/O ?
What are processor execution levels and priorities ?
How do you execute UNIX commands in VI editor ?
How to connect oracle database from UNIX
How do you find out all processes that are currently
What is Scheduling ?
What is the use of command 'wc' ?
How to get the operating system's information in UNIX ?
How to remove weird filenames ?
What are the files in /etc directory ?
What does inetd do ?
How to copy multiple files and directories into
What command will bring user back to their home
What are filters ?
What is a level 0 backup ?
How do you install Oracle software on UNIX ?
What is a Region ?
What is the difference between interrupts and exceptions ?
What is the use of pipes ?
Explain the Write permission on a UNIX directory ?
What is telnet ?
WHAT is the functionality of kernel in UNIX architecture ?
What is the syntax of grep command and What is its use ?
What is a file system ?
What are wild cards ?
What are the different commands used to view
What is a pipe ?
WHAT is the condition required for dead lock in UNIX system ?
What are the events done by the Kernel ?
What are the different kinds of threads ?
How do you log in to a remote UNIX box ?
WHAT are the uses of filters ?
How will you add a user account from command line ?
What is the use of "test" command in UNIX ?
What Command will remove a Directory in UNIX ?
Explain the execute permission on a UNIX directory ?
What is the command to kill a process ?
What scripting languages do you know ?
What is the difference between commands cmp and diff ?
WHAT is the use of nice command ?
How to rename files and folders ?
What is an incremental backup ?
What is vmstat ?
How do you create special files like named pipes
What is the difference between Swapping and Paging ?
What is Expansion swap ?
What is the difference between multi-tasking,
What command is used to replace the existing
What is the command to display space usage on
What is the difference between internal and
What is Critical section ?
How to identify whether a file is normal file or directory ?
What is RAID 1+0 ?
What UNIX command will control the default file
What about the initial process sequence while
What do you mean by nice value ?
Which command will you use to change the
How does a user get the current date, time in UNIX ?
What steps are required to perform a bare-metal recovery ?
Explain about fork() ?
What are the processes that are not bothered by the swapper ?
What is virtual machine ?
How do you move a process Which is running background to foreground ?
What is the basic difference between UNIX and
How does the user view the contents of a text file in UNIX ?
What is the command to list files in a directory in UNIX ?
What is the difference between > and >> operators ?
What is the function of grep command ?
How to redirect standard error to a file ?
WHAT is shell ?
What are the read or write or execute bits on a
How can you get or set an environment variable
What are the various schemes available in IPC ?
How do you know about running processes of a
What is the Command that will move a single file called "UNIX.txt"
How would you change all occurrences of a value using VI ?
What is Context switch ?
Which command is used to change group ?
WHAT are the different commands used to create files ?
How to put a job in background & bring it to foreground ?
What are the mount and unmount system calls ?
How to setup display for a remote system ?
How do you copy a directory with many files and
What is the command to remove directory with files ?
What does init do ?
What is the difference between relative path and
What is the difference between "cron" commands
How to delete a directory containing files and folders ?
What is the difference between grep & find ?
How would you change all occurrences of a value using VI ?
What is an advantage of executing a process in background ?
What is the advantage of each user having its
Write a command to find all of the files Which have
What Command is used to make a directory ?
What is the command to get help on a UNIX terminal ?
What are the different types of tar commands ?
WHAT is the use of "grep" command ?
How do you change your account's password ?
What does iostat do ?
How can a parent and child process communicate ?
What are various IDs associated with a process ?
How do you find path of a directory ?
What command a user use to view a long text file
What is the command to list all files in a directory,
What is setuid/setgid in relation to file permissions ?
What is the use of ‘tee’ command ?
WHICH command is used to identify the type of the file ?
What are the main differences between Apache 1.x and 2.x ?
What is the command to view contents of a large
What is the command to find out the difference
What does the second field denotes in UNIX file permissions ?
What are the differences between CUI and
WHAT is a profile ?
WHAT is the process id for kernel process ?
How does the inode map to data block of a file ?
What is the system calls used for process management ?
What is the main advantage of creating links to a
What command is used to execute system calls from exe ?
How do you execute a UNIX command in the background ?
What does mknod do ?
How to convert a hidden file to normal visible file ?
WHAT are the different operating systems available ?
WHAT happens when we create a file system ?
How do you list the files in an UNIX directory while
How are devices represented in UNIX ?
What do you mean by user area or user block ?
What is the difference between user mode and kernel mode ?
How to get a particular string as your prompt ?
What are raw sockets ?
What command would users use to see What file
How to copy file into directory in UNIX ?
What is the command to find out Which shell you are running ?
Explain the read permission on a UNIX directory ?
What are the process states in UNIX ?
What is the difference between paging and swapping ?
Explain about term 'de-mountable volumes' ?

What Happens when you execute a program in unix

What Happens when you execute a program in unix?

Question :What Happens when you execute a program in unix ?
Answer :When you execute a program on your UNIX system, the system creates a special environment for that program. This environment contains everything needed for the system to run the program as if no other program were running on the system. Each process has process context, which is everything that is unique about the state of the program you are currently running. Every time you execute a program the UNIX system does a fork, which performs a series of operations to create a process context and then execute your program in that context. The steps include the following: • Allocate a slot in the process table, a list of currently running programs kept by UNIX. • Assign a unique process identifier (PID) to the process. • iCopy the context of the parent, the process that requested the spawning of the new process. • Return the new PID to the parent process. This enables the parent process to examine or control the process directly. After the fork is complete, UNIX runs your program.
Keywords:
What happens when you execute a command in unix?
How do you execute a program in a command line?
What happens when you run a program?
How do you execute a program in a command line unix?
how to run c program in unix vi editor
unix commands
unix programming book
how to compile c program in unix
how to run a program in unix terminal
unix shell
bash shell scripting
unix programming language

What is an advantage of executing a process in background

What is an advantage of executing a process in background


Question :What is an advantage of executing a process in background?
Answer :The most common reason to put a process in the background is to allow you to do something else interactively without waiting for the process to complete. At the end of the command you add the special background symbol, &. This symbol tells your shell to execute the given command in the background. Example: cp *.* ../backup& (cp is for copy)
Keywords:
advantages and disadvantages of background process in linux
advantage of background process
background process in unix
a process that runs in the background without the need for user interaction is known as a
managing system services and background processes
processes in linux
interview questions on process management in linux
shell process in unix

How do you execute one program from within another in unix

How do you execute one program from within another in unix

Question :How do you execute one program from within anotherin unix?
Answer :The system calls used for low-level process creation are execlp() and execvp(). The execlp call overlays the existing program with the new one , runs that and exits. The original program gets back control only when an error occurs. execlp(path,file_name,arguments..); //last argument must be NULL A variant of execlp called execvp is used when the number of arguments is not known in advance. execvp(path,argument_array); //argument array should be terminated by NULL
Keywords:
return value from one shell script to another
how to pass variable from one function to another in shell script
bash function call another function
calling functions in shell script
unix function with argument
bash function run command
write function in unix
factorial program in shell script using function

What is IPC What are the various schemes available

What is IPC What are the various schemes available

Question :What is IPC? What are the various schemes available?
Answer :The term IPC (Inter-Process Communication) describes various ways by which different process running on some operating system communicate between each other. Various schemes available are as follows: Pipes: One-way communication scheme through which different process can communicate. The problem is that the two processes should have a common ancestor (parent-child relationship). However this problem was fixed with the introduction of named-pipes (FIFO). Message Queues : Message queues can be used between related and unrelated processes running on a machine. Shared Memory: This is the fastest of all IPC schemes. The memory to be shared is mapped into the address space of the processes (that are sharing). The speed achieved is attributed to the fact that there is no kernel involvement. But this scheme needs synchronization. Various forms of synchronisation are mutexes, condition-variables, read-write locks, record-locks, and semaphores

Keywords:
ipc between processes on different systems
inter process communication types
interprocess communication in distributed system