

McqMate
These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Computer Science Engineering (CSE) .
301. |
The first thing that is searched when a command references a file is its |
A. | i node |
B. | i node number |
C. | permission |
D. | none of the above |
Answer» B. i node number |
302. |
Profilers are |
A. | tools that analyze the run time behavior of a program |
B. | tools that check c code for cross file consistency |
C. | tools that keep track of evolving versions of a file |
D. | none of the above |
Answer» A. tools that analyze the run time behavior of a program |
303. |
Which of the following tools can be used to keep track of evolving version of a file? |
A. | make |
B. | yacc |
C. | sccs |
D. | dv |
Answer» C. sccs |
304. |
The size of any block in the unix file system is |
A. | 512 bytes |
B. | 1024 bytes |
C. | 2048 bytes |
D. | any of the above |
Answer» D. any of the above |
305. |
To find the block size on your file system the command is |
A. | blksz |
B. | szblk |
C. | chksz |
D. | cmchk |
Answer» D. cmchk |
306. |
Each entry in inode table is of size |
A. | 64 kb |
B. | 32kb |
C. | 32 bytes |
D. | 64 bytes |
Answer» D. 64 bytes |
307. |
The program contained in boot block, that loads kernel into memory is called |
A. | disk bootstrap program |
B. | master boot program |
C. | shell program |
D. | none of the above |
Answer» A. disk bootstrap program |
308. |
The state of the file system is contained in |
A. | boot block |
B. | a special block created by book block |
C. | super block |
D. | none of the above |
Answer» C. super block |
309. |
Which file gets executed when we use the passwd command |
A. | /etc/passwd |
B. | /etc/pwd |
C. | /bin/passwd |
D. | /passwd |
Answer» C. /bin/passwd |
310. |
The command cal j 1997 would give the output as |
A. | the calendar of jan,june and july 1997 |
B. | only calendar of jan 1997 |
C. | an error |
D. | none of the above |
Answer» C. an error |
311. |
To see the last access time of various files in a file system the command is |
A. | is-iu |
B. | is-i |
C. | is-acc |
D. | is-mt |
Answer» A. is-iu |
312. |
To ascertain what are the contents of the file in your the system the best way would be |
A. | do a cat command on each file and find its contents |
B. | use the command cat* |
C. | use the command file* |
D. | none of the above |
Answer» C. use the command file* |
313. |
Which of these is not a command of Unix related with DOS |
A. | dosdir a:proj |
B. | doscopy trial a:/ |
C. | doscp/home/pro j/prg a:/ |
D. | dosls |
Answer» B. doscopy trial a:/ |
314. |
How many links are created when we creat a directory file? |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» B. 2 |
315. |
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» B. the number of links for file1 is displayed as 1 |
316. |
here 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 be able to access the file with any of hl, h2 and sl |
D. | we will not be able to access the file with any of hl, h2 and sl |
Answer» A. we will still be able to access the file with hl and h2 but not with sl |
317. |
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» B. hard links |
318. |
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» C. deletes just the softlink |
319. |
Creation of hardlinks that point across partitions |
A. | is allowed only to root user |
B. | can be done by all users |
C. | he effects are unspecified |
D. | is not allowed |
Answer» D. is not allowed |
320. |
Which command is used to change permissions of files and directories? |
A. | mv |
B. | chgrp |
C. | chmod |
D. | set |
Answer» C. chmod |
321. |
Where can I find the printer in the file structure? |
A. | /etc |
B. | /dev |
C. | /lib |
D. | /printer |
Answer» B. /dev |
322. |
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» C. the mv command will preserve the meta data of the file |
323. |
What UNIX command is used to update the modification time of a file? |
A. | time |
B. | modify |
C. | cat |
D. | touch |
Answer» D. touch |
324. |
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» C. creation time |
325. |
Which command is used to set limits on file size |
A. | fsize |
B. | flimit |
C. | ulimit |
D. | usize |
Answer» C. ulimit |
326. |
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» C. –p |
327. |
Which represents the user home directory |
A. | / |
B. | . |
C. | .. |
D. | ~ |
Answer» D. ~ |
328. |
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» B. the file cannot be recovered by a user |
329. |
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» D. nothing happens |
330. |
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» A. mv new old |
331. |
What command is used to copy files and directories? |
A. | copy |
B. | cp |
C. | rn |
D. | cpy |
Answer» B. cp |
332. |
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» B. f2 |
333. |
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» A. inode |
334. |
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» C. every one can read, group including owner can write, owner |
335. |
The permission -rwxr–r– represented in octal expression will be |
A. | 777 |
B. | 666 |
C. | 744 |
D. | 711 |
Answer» C. 744 |
336. |
Effective user id can be set using following permission |
A. | 777 |
B. | 2666 |
C. | 4744 |
D. | 1711 |
Answer» C. 4744 |
337. |
Effective group id can be set using following permission |
A. | 777 |
B. | 2666 |
C. | 4744 |
D. | 1711 |
Answer» B. 2666 |
338. |
Sticky bit can be set using following permission |
A. | 777 |
B. | 2666 |
C. | 4744 |
D. | 1711 |
Answer» D. 1711 |
339. |
The permission -rwSr–r– represented in octal expression will be |
A. | 777 |
B. | 2666 |
C. | 4744 |
D. | 4644 |
Answer» D. 4644 |
340. |
The permission -rwxr-sr– represented in octal expression will be |
A. | 777 |
B. | 2766 |
C. | 2744 |
D. | 2754 |
Answer» D. 2754 |
341. |
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» B. the rm command prompts for a confirmation, the command is successful upon confirmation |
342. |
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» C. the last change time of the file is updated |
343. |
If the umask value is 0002. what will be the permissions of new directory |
A. | 777 |
B. | 775 |
C. | 774 |
D. | 664 |
Answer» B. 775 |
344. |
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» B. chmod –r +x /home/user1/direct |
345. |
The permission -rwxr-xr-t represented in octal expression will be |
A. | 777 |
B. | 1755 |
C. | 1754 |
D. | 2754 |
Answer» B. 1755 |
346. |
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» D. -rw-rw-r– |
347. |
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» C. chmod u=rw file |
348. |
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» D. lears write permission to others for datafile |
349. |
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» B. chmod 640 textfile |
350. |
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» B. chmod u+x project1 |
Done Studing? Take A Test.
Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.