Unix - Questions - Interview / Learning

1. To display the contents of a executable file the following command can be used

Ans : od

2. Assume the current directory contains 10 files and does'nt contain 'temp'. What will be the output of the follwing commands?

$ls > temp
$wc -l temp

Ans : 10

3. If one wants the output of one command (command1) to be printed in the printer as well as to be added to another file (outfile), which one of the following is a currect command he can give?

Ans : $ command | tee -a outfile |lpr

4. In the shell program set -x will cause

Ans : Execution of the commands in verbose mode

5. ACL in UNIX refers to

Ans : Acces Control List

6. The command echo *

Ans : echoes all files in the current directory

7. ls || date will

Ans : print the name of the files in the current directory

followed by

print today's date and time

8. The built-in shell variable $$ refers to

Ans: proces-id of current shell

9. dd is mainly used for

Ans : dealing with raw, unformated data, whatever the source

10. vis in UNIX is

Ans: prints non-printable characters in understandable format

11. The UNIX is

Ans : Multiuser Operating System and Multitasking Operating System

12. ln command is used to

Ans : link between files