MCQ

Linux MCQs – Different File Types

Multiple choice questions and answers (MCQs) on Linux focuses on “Managing of users accounts and groups” to prepare for exams, interviews, and certifications, such as Redhat exam, CompTIA exam, Ubuntu / SuSE certification, LPI certification exam. These MCQs will easily prepare anyone to pass their Linux test.
 

1. The device files are located in which directory?

A /etc

B /bin

C /dev

D /usr

C
The /dev directory contains the special device files. These files are created during the installation.

 

 
 

2. Which one is an example of a special file in block mode?

A Virtual terminal

B CD-ROM

C Terminal

D Serial Modem

B
The /dev/cdrom file is a special block mode file which is a device type file. Block-mode devices tend to be storage devices, capable of buffering output and saving data for later recovery.

 

 

3. Which is an example of a special file in character mode?

A Hard disk

B CD-ROM

C Terminal

D Memory

C
Character mode devices are objects such as audio or graphics cards or input devices such as keyboard and mouse.

 

 

4. What are the two types of device files?

A Block and FIFO

B Inputs and outputs

C Character and block

D Character and Socket

C
There are two types of device files, the first in character mode and the second in block mode.

 

 

5. Which of the following statements is not correct regarding file types?

A Physical links share the same inode number

B Symbolic links cannot be created on partitions

C Socket files are Unix domain sockets

D The file in character mode is a special file

B
Symbolic links can reference a file or directory on another hard disk, volume or partition.

 

 
 

6. Which of the following is not a valid file type in Linux?

A Symbolic links

B FIFO

C Inode

D Socket

C
Inode is a data structure on a file system in Linux and other Unix-like operating systems that saves all the information about a file except its name and actual data. A data structure is a way to store data so that it can be used efficiently.

 

 

7. Which directory contains special device files?

A /etc

B /etc/dev

C /root/bin

D /dev

D
The /dev directory contains special files for all devices. These files are created during the installation.

 

 

8. Any file has a ______________

A Names and sizes

B Names and its inode numbers

C Names and address

D Names and permissions

B
Each file has its own unique inode.

 

 
 

9. srwxr-xrw- is a __________

A internet socket file

B unix domain socket file

C symbolic link

D shared file

B

The first character can be :

  • d = directory
  • – = regular file
  • l = symbolic link
  • s = Unix domain socket
  • p = named pipe
  • c = character device file
  • b = block device file

The following characters can be :

  • r = read permission
  • w = write permission
  • x = execute permission
  • – = 0 permission

With x=1 / w=2 / r=4

 

The first column defines a directory, file, or link, the next three columns define the permissions for User, Group, and Other.

 

 

10. Binary or executable files are ____________

A Regular files

B Device files

C Special files

D Directory files

A
Binary or executable files are regular files.

 

 
mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

Leave a Reply

Your email address will not be published. Required fields are marked *