Multiple Choice Questions(MCQs)& Answers In Linux

Questions
81 How many links are created when we creat a directory file?
A 1
B 2
C 3
D 4

Answer: Option [B]
82 A user creates a link to a file file1 using the following command “ln file1 file2”. Which of the following is not true?
A file1 and file2 have the same inode numbers
B The number of links for file1 is displayed as 1
C The number of links for file1 is displayed as 2
D The number of links for file2 is displayed as 2

Answer: Option [B]
83 There are two hard links to the “file1? say hl and h2 and a softlink sl. What happens if we deleted the “file1?
A We will still be able to access the file with hl and h2 but not with sl
B We will not be able to access the file with hl and h2 but with sl
C We will not be able to access the file with hl and h2 but with sl
D We will not be able to access the file with any of hl, h2 and sl

Answer: Option [A]
84 If two files on same partition point to the same inode structure they are called
A Soft links
B Hard links
C Alias
D Special files

Answer: Option [B]
85 Deleting a soft-link
A Deletes the destination file
B Deletes both the softlink and the destination file
C Deletes just the softlink
D backup of the destination is automatically created

Answer: Option [C]
86 Creation of hardlinks that point across partitions
A is allowed only to root user
B Can be done by all users
C The effects are unspecified
D is not allowed

Answer: Option [D]
87 Which command is used to change permissions of files and directories?
A mv
B chgrp
C chmod
D set

Answer: Option [C]
88 Where can I find the printer in the file structure?
A /etc
B /dev
C /lib
D /printer

Answer: Option [B]
89 Which of the following statement is true?
A The cp command will preserve the meta data of the file
B The sort command by default sorts in the numeric order
C The mv command will preserve the meta data of the file
D The command ps will display the filesystem usage

Answer: Option [C]
90 What UNIX command is used to update the modification time of a file?
A time
B modify
C cat
D touch

Answer: Option [D]
91 The soft link will increase the link counter of the file.(T/F)
A True
B False
C May be false or true
D Can't be determined

Answer: Option [B]
92 When you use the ln command, which of the following occurs?
A a file is created that points to an existing file
B a file is created that is a copy of an existing file
C a file is moved from one location to another
D a file is renamed

Answer: Option [A]
93 srwxr-xrw- is a
A internet socket file
B unix domain socket file
C symbolic link
D shared file

Answer: Option [B]
94 Binary or executable files are:
A Regular files
B Device files
C Special files
D Directory files

Answer: Option [A]
95 The directory file contains:
A File names & File Sizes
B File names & Inode Numbers
C File names & Address
D File names & Permissions

Answer: Option [B]
96 Which directory contain device special files?
A /etc
B /etc/dev
C /root/bin
D /dev

Answer: Option [D]
97 Which of the following is not a valid file type on Linux
A Socket
B Softlink
C Inode
D FIFO

Answer: Option [C]
98 Which of the following is not correct statement regarding file types?
A Hard links share same inode number
B Soft links cannot be created across partitions
C Socket files are Unix domain sockets
D Character file is a special file

Answer: Option [B]
99 Which are the two types of device files?
A Character & Block
B Character & Socket
C Block & FIFO
D Input & output

Answer: Option [A]
100 Which is an example for character special file?
A Hard disk
B CD-ROM
C Terminal
D Memory

Answer: Option [C]