Basic Computer Knowledge Test Questions and Answers

Linux Interview Questions and Answers – File Management 1

1.

Each process has unique

   A.) fd table
   B.) file table
   C.) inode table
   D.) data block table

Answer: Option 'A'

fd table

2.

File descriptor table indexes which kernel structure?

   A.) struct file
   B.) strruct fs_struct
   C.) files_struct
   D.) struct inode

Answer: Option 'A'

struct file

3.

What is the default number of files open per user process?

   A.) 0
   B.) 1
   C.) 2
   D.) 3

Answer: Option 'D'

3

4.

The file system information is stored in

   A.) Boot block
   B.) Super Block
   C.) Inode Table
   D.) Data Block

Answer: Option 'B'

Super Block

5.

Switch table is used by

   A.) device special file
   B.) directory file
   C.) fifo
   D.) link file

Answer: Option 'A'

device special file

6.

What is the use of fcntl function?

   A.) locking a file
   B.) reading the file descriptor flag
   C.) changing the file status flag
   D.) all of these

Answer: Option 'D'

all of these

7.

Which function can be used instead of the dup2 to duplicate the file descriptor?

   A.) read()
   B.) open()
   C.) stat()
   D.) fcntl()

Answer: Option 'D'

fcntl()

8.

printf() uses which system call

   A.) open
   B.) read
   C.) write
   D.) write

Answer: Option 'C'

write

9.

read() system call on success returns

   A.) 0
   B.) -1
   C.) number of character
   D.) none

Answer: Option 'C'

number of character

10.

Which system call is used to create a hard link?

   A.) hardlink
   B.) link
   C.) symlink
   D.) ln

Answer: Option 'B'

link

Linux Interview Questions and Answers – File Management 1 Download Pdf

Recent Posts