Sunday, December 1, 2013

Nitheen Kumar

Unix Interview Questions 4

 
31) What is the use of the tee command?

The tee command does two things: one is to get data from the standard input and send it to standard output; the second is that it redirects a copy of that input data into a file that was specified.

32) Differentiate cat command from more command.?

When using the cat command to display file contents, large data that does not fit on the screen would scroll off without pausing, therefore making it difficult to view. On the other hand, using the more command is more appropriate in such cases because it will display file contents one screen page at a time.

33) What is parsing?

Parsing is the process of breaking up of a command line into words. This is made possible by using delimiters and spaces. In the event that tabs or multiple spaces are part of the command, these are eventually replaced by a single space.

34) What is pid?

Pid is short for Process ID. It is used primarily to identify every process that runs on the UNIX system, whether it runs on the foreground or runs at the background. Every pid is considered unique.

35) How does the system know where one command ends and another begins?

Normally, the newline character, which is generated by the ENTER or RETURN key, acts as the signpost. However, the semicolon and the ampersand characters can also serve as command terminators.

36) What is the difference between multi-user and multi-tasking ?

Multi-tasking means that a user can run multiple tasks simultaneously on a single machine, whereas multi-user means that multiple users can operate simultaneously on a machine.

37) What is wild-card interpretation?

When a command line contains wild-card characters such as ‘*’ or ‘?


’, these are replaced by the shell with a sorted list of files whose pattern matches the input command. Wild-card characters are used to setup a list of files for processing, instead of having it specified one at a time.

38 ) What are the key features of the Korn Shell?

– history mechanism with built-in editor that simulates emacs or vi – built-in integer arithmetic – string manipulation capabilities – command aliasing – arrays – job control


39) How do you switch from any user type to a super user type?

In order to switch from any user type to a superuser, you use the su command. However, you will be asked to key in the correct superuser password before full access privileges are granted to you.

40) What would be the effect of changing the value of PATH to:?

.:/usr/della/bin: /bin: /usr/bin This would cause the shell to look in the /usr/della/bin directory after looking in the current directory and before looking in the /bin directory when searching for a command file.

Prv 1  2 3  4  5 Next

Subscribe to get more Posts :