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

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' ?

Explain kill() in unix and its possible return values.

Explain kill() in unix 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 in unix and give an example?

What is a pipe in unix 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.

What is the difference between cat and more command?

What is the difference between cat and more command?
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?

What is the use of ‘grep’ command?
‘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

Steps a shell follows while processing a command in Unix

Steps a shell follows while processing a command in Unix
After the command line is terminated by the key, the shel goes ahead with processing the command line in
one or more passes. The sequence is well defined and assumes the following order.
Parsing: The shell first breaks up the command line into words, using spaces and the delimiters, unless
quoted. All consecutive occurrences of a space or tab are replaced here with a single space.
Variable evaluation: All words preceded by a $ are avaluated as variables, unless quoted or escaped.
Command substitution: Any command surrounded by backquotes is executed by the shell which then
replaces the standard output of the command into the command line.
Wild-card interpretation: The shell finally scans the command line for wild-cards (the characters *, ?, [, ]).
Any word containing a wild-card is replaced by a sorted list of
filenames that match the pattern. The list of these filenames then forms the arguments to the command.
PATH evaluation: It finally looks for the PATH variable to determine the sequence of directories it has to search in order to hunt for the command.

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