Unix - Filters and Commands

46:  

The first thing that is searched when a command references a file is it

A.

i-node

B.

i-node number

C.

permission setting

D.

none of the above

 
 

Option: B

Explanation :

Suppose you enter a command like cp x y. Unlike the user, who uses the name to identify and differentiate files, the system uses i-node number to uniquely identify a file. Any file name has an associated i-node number. In UNIX. different files can have the same name. But the associated i-nodc number will be different. The filename---i-node correspondence can be found in the directory which has to be the first one that is to be searched, as nothing can be done to a file without knowing its i-node number.

Click on Discuss to view users comments.

Write your comments here:



47:  

 cc command sequentially invokes

A.

preprocessor. compiler and link editor

B.

compiler and link editor

C.

preprocessor, compiler. assembler and link editor

D.

compiler, assembler and link editor

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



48:  

Among the directory entries, i-node and the file contents. which will be changed when a file is updated?

A.

Only directory entry and tile contents

B.

Only i-node and file contents

C.

All the three

D.

None of the above

 
 

Option: B

Explanation :

Directory entries have two fields. One for the file name and the other for the i-node number. The i-node has many fields for storing all the information about the file, except the file name and the actual content of the tile. The content of the file will be in a separate place. So. the details of any file will be spread over these three places. When a file is updated its name and i-node number will remain the same. Only the contents and some fields in the i-node (like file size, time of last access, etc.) need to be changed. Hence the answer

Click on Discuss to view users comments.

Write your comments here:



49:  

The cc command

A.

Can take more than one argument

B.

Can act on files with . or . o extension

C.

Creates . o files by default when more than one argument with .,- extension is present

D.

If provided with more than one argument. immediately terminates it the first argument fails to compile successfully

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



50:  

The mv command changes

A.

Only the directory entry

B.

Only the directory entry and i-node

C.

Only the i-node number

D.

None of the above

 
 

Option: A

Explanation :

The mv command, say. try x y is not going to change the tile content, the i-node number or other information in the i-node. Only the file name is going to change. The file name is present only in the directory. So. the answer is (a).

Click on Discuss to view users comments.

Write your comments here: