Objective type Questions & Answers on linux

Questions
101 Which is an example for block special file?
A Virtual Terminal
B CD-ROM
C Terminal
D Serial modem

Answer: Option [B]
102 All device files are stored in which directory?
A /etc
B /bin
C /dev
D /usr

Answer: Option [C]
103 The file permission 764 means:
A Every one can read, group can execute only and the owner can read and write
B Every one can read and write, but owner alone can execute
C Every one can read, group including owner can write, owner alone can execute
D Every one can read and write and execute View Answer

Answer: Option [A]
104 The permission -rwxr–r– represented in octal expression will be
A 777
B 666
C 744
D 711

Answer: Option [C]
105 Effective user id can be set using following permission
A 0777
B 2666
C 4744
D 1711

Answer: Option [C]
106 Effective group id can be set using following permission
A 0777
B 2666
C 4744
D 1711

Answer: Option [B]
107 Sticky bit can be set using following permission
A 0777
B 2666
C 4744
D 1711

Answer: Option [D]
108 The permission -rwSr–r– represented in octal expression will be
A 0777
B 2666
C 4744
D 4644

Answer: Option [D]
109 The permission -rwxr-sr– represented in octal expression will be
A 0777
B 2766
C 2744
D 2754

Answer: Option [D]
110 If user tries to remove (rm) a readonly file (444 permission), what will happen?
A The file is removed successfully (and silently)
B The rm command prompts for a confirmation, the command is successful upon confirmation
C The rm command prompts for a confirmation, however the operation fails because of insufficient permissions
D The rm command fails because of insufficient permissions

Answer: Option [B]
111 A user does a chmod operation on a file. Which of the following is true?
A The last accessed time of the file is updated
B The last modification time of the file is updated
C The last change time of the file is updated
D None of the above

Answer: Option [C]
112 If the umask value is 0002. what will be the permissions of new directory
A 777
B 775
C 774
D 664

Answer: Option [B]
113 What is the command to set the execute permissions to all the files and subdirectories within the directory /home/user1/direct
A chmod –r +x /home/user1/direct
B chmod –R +x /home/user1/direct
C chmod –f –r +x /home/user1/direct
D chmod –F +x /home/user1/direct

Answer: Option [B]
114 The permission -rwxr-xr-t represented in octal expression will be
A 0777
B 1755
C 1754
D 2754

Answer: Option [B]
115 With a umask value of 112, what is the default permission assigned to newly created regular file?
A —x–x-wx
B -rw-rw-r–
C -r-xr-x-r–
D -rw-rw-r–

Answer: Option [D]
116 Which command is used to assign read-write permission to the owner?
A chmod a+r file
B chmod o+r file
C chmod u=rw file
D chmod og-r file

Answer: Option [C]
117 Given the command $ chmod o-w datafile
A sets write permission to everyone for datafile
B sets write permission to others for datafile
C clears write permission to everyone for datafile
D clears write permission to others for datafile

Answer: Option [D]
118 Which of these commands will set the permissions on file textfile to read and write for the owner, read for the group, and nothing for everyone else?
A chmod 046 textfile
B chmod 640 textfile
C chmod 310 textfile
D chmod rw r nil textfile

Answer: Option [B]
119 If you are a root user, how can you grand execute permission only for the owner of the file project1?
A chmod +x project1
B chmod u+x project1
C chmod a+x project1
D chmod U+X project1

Answer: Option [B]
120 A user executes the following command successfully: $ chmod +x file1.txt Which of the following is true of the output of this command?
A The command results in adding execute permission to the user who ran this command
B The command results in adding execute permission for the owner of the file
C The command results in an error since the file is not an executable file
D The command results in adding execute permission for all users (i.e., user,group & others)

Answer: Option [D]