Showing posts with label unix faqs. Show all posts
Showing posts with label unix faqs. 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, Operating system interview questions faqs

Unix, Operating system interview questions faqs
1)What is the difference between a shell variable that is exported and the one that is not e...
2)What are the possible return status of kill() command?
3)What are the benefits of creating links to a file?
4)What is wildcard?
5)Write a script to convert all dos style backslashes to unix style slashes in a list of fil...
6)How do you read arguments in a shell program - $1, $2 ?
7)What are the steps to take files from unix server to windows?
8)What is the method of setting an environment variable from a program?
9)How do you debug a core dump?
10)How to delete a word from a file using shell scripting???
11)What is the concept of named pipe?
12)How does fork() and vfork() differ?
13)What type of scheduling is used in Unix?
14)Explain the unix file system?
15)What is make used for? How is it different from a shell script?
16)How would you replace the n character in a file with some xyz?
17)What are the steps for locking a file?
18)What is a zombie?
19)What are the differences between Shared and Dynamic libraries?
20)Give examples of how memory leaks can occur with c programs?
21)How to compare floating point number in shell scripting ?
22)How do u open a read only file in Unix?
23)How would you create shared and dynamic libraries?
24)Write a shell script to identify the given string is palindrome or not?
25)What is the use of `du, utility?
26)You want to migrate a 32 bit application to a 64 bit os, what all would you check?
27)What is inter-process communication facility?
28)What is a file server?
29)Explain difference between IPC mechanisms?
30)How would you remove a semaphore / shared memory whose owner processes have died?

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 is relative path and absolute path.

Absolute path : Exact path from root directory.
Relative path : Relative to the current path.

Explain kill() and its possible return values.

There are four possible results from this call:
‘kill()’ returns 0. This implies that a process exists with the given PID, and the system would allow you to
send signals to it. It is system-dependent whether the process could be a zombie.
‘kill()’ returns -1, ‘errno == ESRCH’ either no process exists with the given PID, or security enhancements
are causing the system to deny its existence. (On some systems, the process could be a zombie.)
‘kill()’ returns -1, ‘errno == EPERM’ the system would not allow you to kill the specified process. This means
that either the process exists (again, it could be a zombie) or draconian security enhancements are present
(e.g. your process is not allowed to send signals to *anybody*).
‘kill()’ returns -1, with some other value of ‘errno’ you are in trouble! The most-used technique is to assume
that success or failure with ‘EPERM’ implies that the process exists, and any other error implies that it
doesn't.
An alternative exists, if you are writing specifically for a system (or all those systems) that provide a ‘/proc’
filesystem: checking for the existence of ‘/proc/PID’ may work.

What is a pipe and give an example

A pipe is two or more commands separated by pipe char '|'. That tells the shell to arrange for the output of
the preceding command to be passed as input to the following command.
Example : ls -l | pr
The output for a command ls is the standard input of pr.
When a sequence of commands are combined using pipe, then it is called pipeline.

How to create new a file system in UNIX?

‘mkfs’ Command is used to create a new file system.

Write a command to kill the last background job?

Kill $!

Difference between cat and more command in unix

Cat displays file contents. If the file is large the contents scroll off the screen before we view it. So command 'more' is like a pager which displays the contents page by page.

What is the use of ‘grep’ command in unix

‘grep’ is a pattern search command. It searches for the pattern, specified in the command line with
appropriate option, in a file(s).
Syntax : grep
Example : grep 99mx mcafile

Difference between cmp and diff commands in Unix

cmp - Compares two files byte by byte and displays the first mismatch
diff - tells the changes to be made to make the files identical

Why is “tee” command used in Unix

Tee command It reads the standard input and sends it to the standard output while redirecting a copy of what it has read to
the file specified by the user.

Files and processes in Unix

Everything in UNIX is either a file or a process.

A process is an executing program identified by a unique PID (process identifier).

A file is a collection of data. They are created by users using text editors, running compilers etc.

Examples of files:

  • a document (report, essay etc.)
  • the text of a program written in some high-level programming language
  • instructions comprehensible directly to the machine and incomprehensible to a casual user, for example, a collection of binary digits (an executable or binary file);
  • a directory, containing information about its contents, which may be a mixture of other directories (subdirectories) and ordinary files.

What is a shell in Unix

The shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the username and password, and then starts another program called the shell. The shell is a command line interpreter (CLI). It interprets the commands the user types in and arranges for them to be carried out. The commands are themselves programs: when they terminate, the shell gives the user another prompt (% on our systems).

The adept user can customise his/her own shell, and users can use different shells on the same machine. Staff and students in the school have the tcsh shell by default.

The tcsh shell has certain features to help the user inputting commands.

Filename Completion - By typing part of the name of a command, filename or directory and pressing the [Tab] key, the tcsh shell will complete the rest of the name automatically. If the shell finds more than one name beginning with those letters you have typed, it will beep, prompting you to type a few more letters before pressing the tab key again.

History - The shell keeps a list of the commands you have typed in. If you need to repeat a command, use the cursor keys to scroll up and down the list or type history for a list of previous commands.

The kernel i n Unix

The kernel of UNIX is the hub of the operating system: it allocates time and memory to programs and handles the filestore and communications in response to system calls.

As an illustration of the way that the shell and the kernel work together, suppose a user types rm myfile (which has the effect of removing the file myfile). The shell searches the filestore for the file containing the program rm, and then requests the kernel, through system calls, to execute the program rm on myfile. When the process rm myfile has finished running, the shell then returns the UNIX prompt % to the user, indicating that it is waiting for further commands.

What UNIX operating system consists of?

The UNIX operating system is made up of three parts; the kernel, the shell and the programs.

What Are Different Types of UNIX available

There are many different versions of UNIX, although they share common similarities. The most popular varieties of UNIX are Sun Solaris, GNU/Linux, and MacOS X.

Here in the School, we use Solaris on our servers and workstations, and Fedora Linux on the servers and desktop PCs.

What is UNIX?

UNIX is an operating system which was first developed in the 1960s, and has been under constant development ever since. By operating system, we mean the suite of programs which make the computer work. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops.

UNIX systems also have a graphical user interface (GUI) similar to Microsoft Windows which provides an easy to use environment. However, knowledge of UNIX is required for operations which aren't covered by a graphical program, or for when there is no windows interface available, for example, in a telnet session.