InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which symbol is used to change permissions for hidden files?(a) .(b) &(c) $(d) *This question was addressed to me in final exam.The query is from Changing File Ownership and Permissions topic in division Basic File Attributes of Unix |
|
Answer» Correct choice is (a) . |
|
| 2. |
UNIX allows the system administrator to use the only chown to change both owner and group.(a) True(b) FalseI have been asked this question during an interview.The above asked question is from Changing File Ownership and Permissions topic in section Basic File Attributes of Unix |
|
Answer» The CORRECT option is (a) True |
|
| 3. |
Like chmod, chown and chgrp can also use ___ option.(a) -R(b) -r(c) -x(d) -iI had been asked this question in an online interview.Question is taken from Changing File Ownership and Permissions topic in division Basic File Attributes of Unix |
|
Answer» The correct choice is (a) -R |
|
| 4. |
A user can change the group ownership of a file to another group to which he does not belong.(a) True(b) FalseI had been asked this question in final exam.My question is from Changing File Ownership and Permissions in division Basic File Attributes of Unix |
|
Answer» CORRECT OPTION is (B) False Best explanation: Group ownership can be changed only to that group to which the user also belongs otherwise a user cannot change the group ownership of a file to ANOTHER group to which he does not belong. |
|
| 5. |
Which command is used to change the group owner of the file?(a) chown(b) ch(c) chgrp(d) chmodThis question was posed to me in homework.My doubt is from Changing File Ownership and Permissions in chapter Basic File Attributes of Unix |
|
Answer» Right CHOICE is (c) chgrp |
|
| 6. |
Which option is used for the recursive functioning of chmod command?(a) -R(b) -r(c) -l(d) -iThe question was asked during a job interview.My doubt stems from Changing File Ownership and Permissions topic in division Basic File Attributes of Unix |
|
Answer» CORRECT ANSWER is (a) -R To ELABORATE: Like other UNIX commands, chmod can also descend a directory hierarchy and apply the EXPRESSION to every file and subdirectories it finds. This is done USING -R option. For example, |
|
| 7. |
Which command is used to change the ownership of a file?(a) chmod(b) change(c) ch(d) chownI got this question by my college professor while I was bunking the class.My query is from Changing File Ownership and Permissions in portion Basic File Attributes of Unix |
|
Answer» CORRECT option is (d) chown To explain I would say: For CHANGING the file ownership, we USE the chown command. chown transfer the ownership of a file to another user. The command requires the user-ID (UID) of the recipient. To change the ownership of a file from user01 to user02, use the FOLLOWING COMMANDS: |
|
| 8. |
A file named file01 should be readable, writable and executable only by the user(owner). Which one of the following set of command will be used?(a) chmod 700 file01(b) chmod 000 file01(c) chmod477 file01(d) chmod777 file01I got this question in quiz.I need to ask this question from Changing File Ownership and Permissions in division Basic File Attributes of Unix |
|
Answer» CORRECT choice is (a) chmod 700 file01 To explain: SINCE 7(111) REPRESENTS read, write, execute permission. So 700 will represent read, write, execute permission only for the user (OWNER). |
|
| 9. |
A file has a permission set as 000 i.e. — — —. Can the file be deleted?(a) Yes(b) NoThis question was addressed to me by my college director while I was bunking the class.This interesting question is from Changing File Ownership and Permissions in chapter Basic File Attributes of Unix |
|
Answer» The correct ANSWER is (a) Yes |
|
| 10. |
A file has a permission set as 777 ie rwxrwxrwx but the directory permissions are 400. If the user tries to delete the file, will he be able to do it?(a) Yes(b) NoI had been asked this question in quiz.This intriguing question originated from Changing File Ownership and Permissions in section Basic File Attributes of Unix |
|
Answer» The correct option is (b) No |
|
| 11. |
While changing permissions in an absolute manner, we explicitly set all the nine bits irrespective of the previous permissions of the file.(a) True(b) FalseThe question was asked in examination.This intriguing question comes from Changing File Ownership and Permissions in chapter Basic File Attributes of Unix |
|
Answer» The correct choice is (a) True |
|
| 12. |
To remove write permission from group and others, which one of the following commands will be used?(a) chmodgo+w file01(b) chmodgo-w file01(c) chmodug-w file01(d) chmod a-w file01This question was addressed to me by my school principal while I was bunking the class.This is a very interesting question from Changing File Ownership and Permissions topic in section Basic File Attributes of Unix |
|
Answer» The correct option is (b) chmodgo-w file01 |
|
| 13. |
Which character is used to replace ‘ugo’ string in chmod command?(a) a(b) v(c) x(d) oI got this question in an interview for internship.My doubt stems from Changing File Ownership and Permissions topic in chapter Basic File Attributes of Unix |
|
Answer» The correct CHOICE is (a) a |
|
| 14. |
To assign execute permission to the user (owner) for a file named file01.txt, which of the following command will be used?(a) chmod u+r file01.txt(b) chmod u+w file01.txt(c) chmodu-x file01.txt(d) chmod u+x file01.txtI got this question during an interview.I'm obligated to ask this question of Changing File Ownership and Permissions topic in section Basic File Attributes of Unix |
|
Answer» RIGHT choice is (d) CHMOD u+x file01.txt The EXPLANATION is: To assign execute PERMISSION to the USER, above command is stated as follows: |
|
| 15. |
Which of the following symbol is used with chmod to assign permission to a file?(a) –(b) /(c) +(d) *This question was posed to me in a national level competition.Enquiry is from Changing File Ownership and Permissions in chapter Basic File Attributes of Unix |
|
Answer» Correct answer is (c) + |
|
| 16. |
Which of the following characters specify the user and group category?(a) ‘u’ and ‘g’(b) ‘g’ and ‘o’(c) ‘us’ and ‘gr’(d) ‘u’ and ‘o’The question was posed to me during an interview.This interesting question is from Changing File Ownership and Permissions in division Basic File Attributes of Unix |
|
Answer» Correct choice is (a) ‘u’ and ‘g’ |
|
| 17. |
The expression used with chmod command to change permissions in a relative manner contains ____ components.(a) 5(b) 2(c) 4(d) 3I got this question by my college professor while I was bunking the class.Query is from Changing File Ownership and Permissions in chapter Basic File Attributes of Unix |
|
Answer» The correct option is (d) 3 |
|
| 18. |
chmod command can be used in ____ ways.(a) 3(b) 2(c) 5(d) 0This question was posed to me during a job interview.The question is from Changing File Ownership and Permissions in chapter Basic File Attributes of Unix |
|
Answer» Correct OPTION is (B) 2 |
|
| 19. |
chmod command can take multiple filenames as arguments.(a) True(b) FalseThis question was addressed to me by my school teacher while I was bunking the class.Origin of the question is Changing File Ownership and Permissions in division Basic File Attributes of Unix |
|
Answer» Right OPTION is (a) True |
|
| 20. |
A file owner does not have a permission to edit the file but the group to which the file owner belong do have the permission to edit it. Can owner edit the file?(a) Yes(b) No(c) Cannot be defined(d) Error will be encounteredThe question was asked in quiz.The above asked question is from File Ownership and Permissions in division Basic File Attributes of Unix |
|
Answer» The correct option is (b) No |
|
| 21. |
Which command is used to change the permissions of a file?(a) chmod(b) ch(c) chown(d) chgrpI have been asked this question in exam.The query is from Changing File Ownership and Permissions in division Basic File Attributes of Unix |
|
Answer» Correct answer is (a) chmod |
|
| 22. |
Which of the following is default permission set for directories?(a) rw-rw-rw-(b) rwxrwxrwx(c) r–r–r–(d) rw-rw-rwxThis question was posed to me in final exam.I want to ask this question from File Ownership and Permissions topic in portion Basic File Attributes of Unix |
|
Answer» Correct OPTION is (b) rwxrwxrwx |
|
| 23. |
What is execute permission?(a) permission to execute the file(b) permission to delete the file(c) permission to rename the file(d) permission to search or navigate through the directoryThe question was posed to me during an online interview.My doubt stems from File Ownership and Permissions topic in section Basic File Attributes of Unix |
|
Answer» Right answer is (d) permission to search or navigate through the directory |
|
| 24. |
Which of the following is default permission set for ordinary files?(a) rw-rw-rw-(b) rwxrwxrwx(c) r–r–r–(d) rw-rw-rwxThis question was addressed to me by my college director while I was bunking the class.This key question is from File Ownership and Permissions in section Basic File Attributes of Unix |
|
Answer» RIGHT OPTION is (a) rw-rw-rw- Best explanation: The default permission SET for an ordinary file is rw-rw-rw i.e. it is readable and writable by owner, group MEMBER and others. |
|
| 25. |
If the file is write-protected and the directory has to write permission then we cannot delete the file.(a) True(b) FalseI had been asked this question in unit test.My doubt is from File Ownership and Permissions topic in portion Basic File Attributes of Unix |
|
Answer» Correct choice is (b) False |
|
| 26. |
If a file is read protected, we can write to the file.(a) True(b) FalseThe question was asked in an online quiz.This is a very interesting question from File Ownership and Permissions topic in section Basic File Attributes of Unix |
|
Answer» RIGHT answer is (b) False The best explanation: If a file is not readable then it is OBVIOUS that we cannot write anything to the file. To write anything to a file it should be readable FIRST. But if a file is writable then we can READ the file easily but the reverse is not TRUE. |
|
| 27. |
The write permission for a directory determines that ____________(a) we can write to a directory file(b) we can read the directory file(c) we can execute the directory file(d) we can add or remove files to itI got this question in homework.My enquiry is from File Ownership and Permissions in chapter Basic File Attributes of Unix |
|
Answer» Correct OPTION is (d) we can ADD or remove FILES to it |
|
| 28. |
A file has permissions as rwx r– —. A user other than the owner cannot edit the file.(a) True(b) FalseThe question was asked in class test.The doubt is from File Ownership and Permissions topic in division Basic File Attributes of Unix |
|
Answer» The CORRECT ANSWER is (a) True |
|
| 29. |
What is group ownership?(a) group of users who can access the file(b) group of users who can create the file(c) group of users who can edit the file(d) group of users who can delete the fileThe question was posed to me during an internship interview.This interesting question is from File Ownership and Permissions in portion Basic File Attributes of Unix |
|
Answer» The CORRECT choice is (a) group of users who can access the file |
|
| 30. |
When we create a file, we are the owner of a file.(a) True(b) FalseThe question was posed to me in an interview.My query is from File Ownership and Permissions topic in section Basic File Attributes of Unix |
|
Answer» Correct answer is (a) True |
|
| 31. |
Which of the following symbol is used to indicate the absence of a permission of a file?(a) $(b) &(c) +(d) –The question was asked during an interview.I want to ask this question from File Ownership and Permissions in division Basic File Attributes of Unix |
|
Answer» Correct CHOICE is (d) – |
|
| 32. |
Permissions of a file are represented by which of the following characters?(a) r,w,x(b) e,w,x(c) x,w,e(d) e,x,wI had been asked this question in unit test.Asked question is from File Ownership and Permissions in section Basic File Attributes of Unix |
|
Answer» The correct OPTION is (a) r,w,x |
|
| 33. |
A file can be recognized as an ordinary file or directory by ____ symbol.(a) $(b) –(c) *(d) /I have been asked this question in an interview for internship.This intriguing question comes from File Ownership and Permissions in division Basic File Attributes of Unix |
|
Answer» The correct option is (B) – |
|
| 34. |
How many types of permissions a file has in UNIX?(a) 1(b) 2(c) 3(d) 4This question was addressed to me in semester exam.This key question is from File Ownership and Permissions topic in chapter Basic File Attributes of Unix |
|
Answer» Correct option is (c) 3 |
|
| 35. |
A file contains 1026 bytes. How many bytes of disk space will it consume if size of a disk block is 1024 bytes?(a) 1026(b) 1024(c) 2048(d) 4096I had been asked this question by my college professor while I was bunking the class.I would like to ask this question from Listing File and Directory Attributes in section Basic File Attributes of Unix |
|
Answer» The correct choice is (C) 2048 |
|
| 36. |
File attributes are of major concern as compared to directory attributes while performing operations on file system.(a) True(b) FalseThe question was asked by my school teacher while I was bunking the class.My query is from Listing File and Directory Attributes in section Basic File Attributes of Unix |
|
Answer» Correct answer is (B) False |
|
| 37. |
Which option is used with ls command to list the directory attributes rather than its contents?(a) -b(b) -a(c) -l(d) -dThe question was asked in homework.Enquiry is from Listing File and Directory Attributes topic in division Basic File Attributes of Unix |
|
Answer» Correct choice is (d) -d |
|
| 38. |
Soft linked files are provided with different inode number as the original one.(a) True(b) FalseThe question was asked during an interview.I need to ask this question from Listing File and Directory Attributes in chapter Basic File Attributes of Unix |
|
Answer» The correct CHOICE is (a) True |
|
| 39. |
Hard linked files are provided with the same inode number as the original one.(a) True(b) FalseThe question was asked in homework.This intriguing question comes from Listing File and Directory Attributes in division Basic File Attributes of Unix |
|
Answer» Correct OPTION is (a) True |
|
| 40. |
What are links referred to as in file attributes?(a) number of filenames of a single file that are maintained by the system(b) number of duplicates of a single file(c) number of copies of a single file(d) number of files present in a directoryThe question was asked in a job interview.The origin of the question is Listing File and Directory Attributes in section Basic File Attributes of Unix |
|
Answer» CORRECT ANSWER is (a) NUMBER of filenames of a single file that are maintained by the system The explanation is: Links are defined as the number of filenames of a single file that are maintained by the system. This file can be accessed through as MANY filenames as there is a number of links to that file. |
|
| 41. |
In how many categories are links divided?(a) 1(b) 2(c) 4(d) 0I have been asked this question in an online quiz.My doubt stems from Listing File and Directory Attributes topic in portion Basic File Attributes of Unix |
|
Answer» Correct answer is (b) 2 |
|
| 42. |
Which one of the following is not an attribute displayed by ls command?(a) file permissions(b) file ownership(c) links(d) word count of fileThe question was posed to me in an interview for internship.This question is from Listing File and Directory Attributes in portion Basic File Attributes of Unix |
|
Answer» Right option is (d) word count of file |
|
| 43. |
Which command is used to list the attributes of a file?(a) cp(b) list(c) ls(d) attrThis question was posed to me in unit test.I need to ask this question from Listing File and Directory Attributes topic in portion Basic File Attributes of Unix |
|
Answer» The CORRECT option is (C) ls |
|
| 44. |
An attribute is a specification of an object that defines its property.(a) True(b) FalseI had been asked this question by my school teacher while I was bunking the class.This is a very interesting question from Listing File and Directory Attributes in portion Basic File Attributes of Unix |
|
Answer» Right ANSWER is (a) True |
|