Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

which to mount the file system

A. root
B. boot
C. mount-point
D. partition
Answer» D. partition
2.

Which file contains the filesystems to be automatically mounted during boot?

A. /etc/mount
B. /etc/fstab
C. /etc/inittab
D. /etc/boot
Answer» C. /etc/inittab
3.

Which filesystem can be used to change certain kernel parameters at runtime using sysctl command?

A. ext3
B. sysfs
C. ext4
D. procfs
Answer» E.
4.

Filesystem for CDROM is:

A. ext3
B. sysfs
C. ext4
D. procfs
Answer» D. procfs
5.

Which among the following allows fast file system recovery?

A. ext2
B. journaling
C. caching
D. sysfs
Answer» C. caching
6.

Which file system has journaling capability?

A. ext2
B. ext4
C. isofs
D. procfs
Answer» C. isofs
7.

Which is an example for block special file?

A. virtual terminal
B. cd-rom
C. terminal
D. serial modem
Answer» C. terminal
8.

Which command is used to check filesystem usage in a system?

A. mount
B. df
C. du
D. dd
Answer» C. du
9.

Which is an example for character special file?

A. hard disk
B. cd-rom
C. terminal
D. memory
Answer» D. memory
10.

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» C. socket files are unix domain sockets
11.

Which of the following is not a valid file type on Linux

A. socket
B. softlink
C. inode
D. fifo
Answer» D. fifo
12.

Which are the two types of device files?

A. character & block
B. character & socket
C. block & fifo
D. input & output
Answer» B. character & socket
13.

The directory file contains

A. file names & file sizes
B. file names & inode numbers
C. file names & address
D. file names & permissions
Answer» C. file names & address
14.

Binary or executable files are:

A. regular files
B. device files
C. special files
D. directory files
Answer» B. device files
15.

Which directory contain device special files?

A. /etc
B. /etc/dev
C. /root/bin
D. /dev
Answer» E.
16.

srwxr-xrw- is a

A. internet socket file
B. unix domain socket file
C. symbolic link
D. shared file
Answer» C. symbolic link
17.

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» B. a file is created that is a copy of an existing file
18.

. 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
Answer» D. every one can read and write and execute
19.

If a file is removed in Unix using ‘rm’ then

A. the file can be recovered by a normal user
B. the file cannot be recovered by a user
C. the file can be fully recovered provided the sytem is not rebooted
D. the file will be moved to /lost+found directory and can be recovered only by administrator’s
Answer» C. the file can be fully recovered provided the sytem is not rebooted
20.

The command chmod 4777 a.out

A. will set the suid bit of a.out
B. will set the suid bit of a.out only if the command is issued by root
C. is not a valid command
D. will set the sticky bit of a.out
Answer» B. will set the suid bit of a.out only if the command is issued by root
21.

Which of the following umask settings doesn’t allow execute permission to be set by default on directory files

A. 222
B. 111
C. 444
Answer» D.
22.

What does chmod +t do?

A. wrong syntax
B. set effective userid for filename
C. set effective groupid for filename
D. set the sticky bit
Answer» E.
23.

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» C. chmod a+x project1
24.

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» C. chmod 310 textfile
25.

A user executes the following command successfully:$ chmod +x file1.txt Which of the following is true of the output of this command?

A. he 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» E.
26.

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. lears write permission to others for datafile
Answer» E.
27.

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» D. chmod og-r file
28.

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» E.
29.

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/dire ct
Answer» C. chmod –f –r +x /home/user1/direct
30.

The permission -rwxr-xr-t represented in octal expression will be

A. 777
B. 1755
C. 1754
D. 2754
Answer» C. 1754
31.

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» D. none of the above
32.

f 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. he rm command prompts for a confirmation, however the operation fails because of insufficient permissions
D. the rm command fails because of insufficient permissions
Answer» C. he rm command prompts for a confirmation, however the operation fails because of insufficient permissions
33.

The permission -rwSr–r– represented in octal expression will be

A. 777
B. 2666
C. 4744
D. 4644
Answer» E.
34.

The permission -rwxr-sr– represented in octal expression will be

A. 777
B. 2766
C. 2744
D. 2754
Answer» E.
35.

Effective user id can be set using following permission

A. 777
B. 2666
C. 4744
D. 1711
Answer» D. 1711
36.

Effective group id can be set using following permission

A. 777
B. 2666
C. 4744
D. 1711
Answer» C. 4744
37.

The permission -rwxr–r– represented in octal expression will be

A. 777
B. 666
C. 744
D. 711
Answer» D. 711
38.

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
D. every one can read and write and execute
Answer» D. every one can read and write and execute
39.

Any file’s attribute information is stored in which structure on the disk

A. inode
B. data blocks
C. file blocks
D. directory file
Answer» B. data blocks
40.

What command is used to copy files and directories?

A. copy
B. cp
C. rn
D. cpy
Answer» C. rn
41.

When mv f1 f2 is executed which file’s inode is freed?

A. f1
B. f2
C. new inode will be used
D. mplementation dependent
Answer» C. new inode will be used
42.

How do you rename file “new” to file “old”?

A. mv new old
B. move new old
C. cp new old
D. rn new old
Answer» B. move new old
43.

Executing the ‘cd ..’ command when at the root level causes

A. error message indicating the user can’t access beyond the root level
B. behavior is unix- flavor dependent
C. results in changing to the ‘home’ directory
D. nothing happens
Answer» E.
44.

Which represents the user home directory

A. /
B. .
C. ..
D. ~
Answer» E.
45.

f a file is removed in Unix using ‘rm’ then

A. the file can be recovered by a normal user
B. the file cannot be recovered by a user
C. the file can be fully recovered provided the sytem is not rebooted
D. he file will be moved to /lost+found directory and can be recovered only by administrator’s intervention
Answer» C. the file can be fully recovered provided the sytem is not rebooted
46.

Which option of rmdir command will remove all directories a, b, c if path is a/b/c

A. –b
B. –o
C. –p
D. –t
Answer» D. –t
47.

Which command is used to set limits on file size

A. fsize
B. flimit
C. ulimit
D. usize
Answer» D. usize
48.

Which of the following time stamps need not exist for a file on traditional unix file system

A. access time
B. modification time
C. creation time
D. change time
Answer» D. change time
49.

What UNIX command is used to update the modification time of a file?

A. time
B. modify
C. cat
D. touch
Answer» E.
50.

Where can I find the printer in the file structure?

A. /etc
B. /dev
C. /lib
D. /printer
Answer» C. /lib