Unix - Filters and Commands

31:  

 If the command cat x is executed after successfully executing the command time sort  filename > x, then

A. only the time details will be displayed
B. only the sorted contents of the file filename will be displayed
C. an error message will be displayed
D. None of the above
 
 

Option: B

Explanation :
The time command uses stderr, instead of stdout to display its results. As a result of this. what is redirected to x is just the output of sort filename command and not the time details. The time details will he displayed in the screen, since screen by default is the stderr

Click on Discuss to view users comments.

Write your comments here:



32:  

Which of the following information is not present in an i-node

A.

Contents of the file

B.

Name of the file

C.

Size of the file

D.

Both (a) and (b)

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



33:  

The system identifies a file by its

A. name
B. absolute path
C. Both (a) and (b)
D. Mode number
 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Naeem Mughal said: (8:44pm on Thursday 28th May 2015)
Inode numberIndex Node number

Write your comments here:



34:  

 The system identifies the end of a file by the

A. EOF character
B. file size
C. i-node number
D. Both (a) and (b)
 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



35:  

 The command line argument   a.out  x  'a  b'  "c  d"

A. is acceptable
B. is acceptable if the double quotes are replaced by single quotes
C. is acceptable if the single quotes arc replaced by double quotes
D. none of the above
 
 

Option: A

Explanation :
Any command that is keyed-in will be first processed by the shell, which divides the command into tokens, taking into account the metacharacters. So. a b will be divided into two tokens a and b. But 'a b' or "a b" will pass a b as such (i.e. as one token). So. argv [2] will be 'a b' and argv[3] will be "c d". Hence the answer.

Click on Discuss to view users comments.

Write your comments here: