Classical

Unix - Filters and Commands

51:  

If 7 terminals are currently logged on. then the command

date ; who | wc -l, displays

A.

date followed by 7

B.

date followed by 8

C.

date followed by 1

D.

an error message

 
 

Option: A

Explanation :


52:  

Choose the correct answers if the command ls -l /dev/mt0 display's

brw_rw_ _ _ _ 1 root 3, 0 Apr18 1:05 mt0

A.

The 'b' indicates that it is a special file

B.

mt0 indicates that it is a tape drive

C.

The ' b' indicates that data transfer is done in blocks

D.

All of these

 
 

Option: D

Explanation :

For regular (ordinary) files the first character (i.e. b here), will be just a underscore. For directories d. for character special files ' ' and ' b' for a block read special file. The last column will have lp for line printer. hp for disk drives. tty for terminals etc. The 3 in 3 , denotes the major device number and - minor device number. That is. this system denotes tape drives by 3 and 0 to single out a particular tape drive from the many tape drives, the system may have.


53:  

Choose the correct statements.

A.

id x .o is a valid command (assume x . o exists)

B.

cc x. s is a valid command (assume x . s exists)

C.

Both (a) and (b)

D.

None of these

 
 

Option: C

Explanation :


54:  

cat/dev/tty

A.

Throws garbage onto the terminal 1.

B.

Just echoes what you type. line by line

C.

Terminates if one types control at the beginning of a line

D.

Both (b) & (c)

 
 

Option: D

Explanation :

First, the i-node number corresponding to idevi tty (i.e. the terminal currently used) is procured. Then the i-node is accessed. From it, the system understands, it is a character special file. So, whatever you type, if followed by ' n ' will he echoed in the terminal. Typing control d, also lushes the buffer contents to t ty. But unlike 'control d is not transmitted. So. if you type ab ( Ad) cd ( Ad) first ab will be immediately transmitted, then cd will be transmitted. Whenever you press control d. then what you have typed between the previous control d (or from the start of the current line) to the current control d will be transmitted. So. if you type two control d consecutively or a single control d. at the beginning of a line then you are telling it to transmit. but nothing is there to be transmitted. So. the command gets terminated.


55:  

The header files used in C programs arc usually found in

A.

/bin/include

B.

usr/bin/include

C.

/dev/ include

D.

iusr/include

 
 

Option: A

Explanation :




Suggest an improvement