UNIX MCQs – File System Administration (Part – 1)

UNIX Question and Answer – File System Administration

UNIX MCQ – Multiple Choice Questions for exam, interview, and Entrance Test

1. What command is used to perform a file system check in UNIX?

a) chkfs

b) fscheck

c) fsck

d) checkfs

Answer: c) fsck

Explanation: The fsck command is used to perform a file system check and repair any inconsistencies in UNIX.


2. Which option of the fsck command is used to automatically repair detected file system errors?

a) -p

b) -r

c) -f

d) -a

Answer: d) -a

Explanation: The -a option of the fsck command is used to automatically repair detected file system errors in UNIX.


3. What is the purpose of the df command in UNIX?

a) Display disk format

b) Display disk fragmentation

c) Display disk file system usage

d) Display disk firmware information

Answer: c) Display disk file system usage

Explanation: The df command is used to display information about disk space usage and file system usage in UNIX.


4. Which command is used to display the disk usage of files and directories in UNIX?

a) du

b) df

c) diskusage

d) spaceusage

Answer: a) du

Explanation: The du command is used to display the disk usage of files and directories in UNIX.


5. What is the purpose of the -h option in the du command?

a) Display usage in human-readable format

b) Display hidden files

c) Display hierarchical usage

d) Display hardware information

Answer: a) Display usage in human-readable format

Explanation: The -h option of the du command is used to display disk usage in a human-readable format in UNIX.


6. Which command is used to set disk quotas for users in UNIX?

a) quota

b) diskquota

c) setquota

d) userquota

Answer: a) quota

Explanation: The quota command is used to set disk quotas for users in UNIX, limiting their disk usage.


7. What is the purpose of disk quotas in UNIX?

a) Limit disk space usage for users

b) Increase disk performance

c) Control disk fragmentation

d) Monitor disk temperature

Answer: a) Limit disk space usage for users

Explanation: Disk quotas in UNIX are used to limit disk space usage for users, ensuring fair allocation and preventing misuse.


8. Which command is used to display disk quota usage for users in UNIX?

a) showquota

b) viewquota

c) quota

d) diskquota

Answer: c) quota

Explanation: The quota command is used to display disk quota usage for users in UNIX.


9. What is the purpose of the -m option in the quota command?

a) Display quota usage in megabytes

b) Display quota usage in megabits

c) Display quota in percentage

d) Display quota in human-readable format

Answer: a) Display quota usage in megabytes

Explanation: The -m option of the quota command is used to display quota usage in megabytes in UNIX.


10. Which command is used to set disk quotas for a specific file system in UNIX?

a) setquota

b) edquota

c) quotaset

d) fsquota

Answer: a) setquota

Explanation: The setquota command is used to set disk quotas for a specific file system in UNIX.


11. What is the purpose of the quotacheck command in UNIX?

a) Check disk quotas for users

b) Check disk usage for users

c) Update disk quota files

d) Update disk usage files

Answer: c) Update disk quota files

Explanation: The quotacheck command is used to update disk quota files in UNIX, ensuring accurate quota management.


12. Which command is used to display inode usage in UNIX?

a) iusage

b) inode

c) ls -i

d) df -i

Answer: d) df -i

Explanation: The df command with the -i option is used to display inode usage in UNIX.


13. What is the purpose of the -i option in the df command?

a) Display inode usage

b) Display disk format

c) Display disk information

d) Display disk fragmentation

Answer: a) Display inode usage

Explanation: The -i option of the df command is used to display inode usage in UNIX.


14. Which command is used to set soft limits for disk quotas in UNIX?

a) softquota

b) edquota

c) setquota

d) limits

Answer: b) edquota

Explanation: The edquota command is used to set soft limits for disk quotas in UNIX.


15. What is the purpose of the -t option in the quota command?

a) Display total disk usage

b) Display user quotas

c) Display group quotas

d) Display tree structure of directories

Answer: a) Display total disk usage

Explanation: The -t option of the quota command is used to display total disk usage in UNIX.


16. Which command is used to report file system disk space usage in UNIX?

a) usage

b) diskusage

c) du

d) df

Answer: d) df

Explanation: The df command is used to report file system disk space usage in UNIX.


17. What is the purpose of the -k option in the du command?

a) Display usage in kilobytes

b) Display hidden files

c) Display usage in human-readable format

d) Display kernel information

Answer: a) Display usage in kilobytes

Explanation: The -k option of the du command is used to display disk usage in kilobytes in UNIX.


18. Which command is used to display detailed information about disk space usage in UNIX?

a) diskusage

b) df -a

c) du -h

d) ls -l

Answer: c) du -h

Explanation: The du command with the -h option is used to display detailed information about disk space usage in UNIX.


19. What is the purpose of the -g option in the du command?

a) Display usage in gigabytes

b) Display group quotas

c) Display hidden files

d) Display usage in human-readable format

Answer: a) Display usage in gigabytes

Explanation: The -g option of the du command is used to display disk usage in gigabytes in UNIX.


20. Which command is used to set disk quotas for a specific user in UNIX?

a) userquota

b) setquota

c) edquota

d) quota

Answer: c) edquota

Explanation: The edquota command is used to set disk quotas for a specific user in UNIX.


21. What is the purpose of the -c option in the setquota command?

a) Check quota usage

b) Create new quota file

c) Clear existing quotas

d) Change quota configuration

Answer: b) Create new quota file

Explanation: The -c option of the setquota command is used to create a new quota file in UNIX.


22. Which command is used to display disk space usage statistics for all files and directories in a directory tree?

a) diskspace

b) treespace

c) du -s

d) du -a

Answer: d) du -a

Explanation: The du command with the -a option is used to display disk space usage statistics for all files and directories in a directory tree in UNIX.


23. What is the purpose of the -s option in the du command?

a) Display summary information

b) Display hidden files

c) Display usage in human-readable format

d) Display usage in kilobytes

Answer: a) Display summary information

Explanation: The -s option of the du command is used to display summary information, showing only the total disk usage for each specified directory.


24. Which command is used to display disk space usage for a specific file or directory in UNIX?

a) space

b) usage

c) df

d) du

Answer: d) du

Explanation: The du command is used to display disk space usage for a specific file or directory in UNIX.


25. What is the purpose of the -x option in the du command?

a) Exclude file system mount points

b) Include hidden files

c) Include system files

d) Display usage in human-readable format

Answer: a) Exclude file system mount points

Explanation: The -x option of the du command is used to exclude file system mount points from disk usage calculations in UNIX.


26. What is the purpose of the quotactl() system call in UNIX?

a) Set file permissions

b) Manage disk quotas

c) Display disk usage

d) Execute shell commands

Answer: b) Manage disk quotas

Explanation: The quotactl() system call is used to manage disk quotas in UNIX.


27. Which command is used to display the disk space usage of a specific file or directory in UNIX?

a) spaceusage

b) size

c) du

d) diskusage

Answer: c) du

Explanation: The du command is used to display the disk space usage of a specific file or directory in UNIX.


28. What is the purpose of the -l option in the df command?

a) Display usage in long format

b) Display usage in human-readable format

c) Display usage for local file systems only

d) Display usage for remote file systems only

Answer: c) Display usage for local file systems only

Explanation: The -l option of the df command is used to display disk usage for local file systems only in UNIX.


29. Which command is used to display the number of inodes used and available on a file system in UNIX?

a) inode

b) df -i

c) inodes

d) ls -i

Answer: b) df -i

Explanation: The df command with the -i option is used to display the number of inodes used and available on a file system in UNIX.


30. What is the purpose of the -t option in the df command?

a) Display total disk space

b) Display total disk usage

c) Display total inodes

d) Display total file systems

Answer: b) Display total disk usage

Explanation: The -t option of the df command is used to display total disk usage in UNIX.


31. Which command is used to set disk quotas for a specific group of users in UNIX?

a) groupquota

b) setquota

c) edquota

d) quota

Answer: c) edquota

Explanation: The edquota command is used to set disk quotas for a specific group of users in UNIX.


32. What is the purpose of the -u option in the quota command?

a) Display user quotas

b) Display group quotas

c) Display disk usage

d) Display summary information

Answer: a) Display user quotas

Explanation: The -u option of the quota command is used to display user quotas in UNIX.


33. Which command is used to report disk space usage statistics for the specified directory and its subdirectories in UNIX?

a) diskusage

b) spaceusage

c) du -h

d) du -d

Answer: d) du -d

Explanation: The du command with the -d option is used to report disk space usage statistics for the specified directory and its subdirectories in UNIX.


34. What is the purpose of the -h option in the df command?

a) Display usage in human-readable format

b) Display hidden files

c) Display usage for mounted file systems

d) Display usage in hierarchical format

Answer: a) Display usage in human-readable format

Explanation: The -h option of the df command is used to display disk usage in human-readable format in UNIX.


35. Which command is used to set disk quotas for a specific file system in UNIX?

a) setfsquota

b) fsquota

c) setquota

d) edquota

Answer: a) setfsquota

Explanation: The setfsquota command is used to set disk quotas for a specific file system in UNIX.


36. What is the purpose of the -x option in the du command?

a) Display usage in kilobytes

b) Exclude mount points

c) Display usage in human-readable format

d) Display usage for a specific user

Answer: b) Exclude mount points

Explanation: The -x option of the du command is used to exclude mount points from disk usage calculations in UNIX.


37. Which command is used to reset disk quotas for users in UNIX?

a) resetquota

b) clearquota

c) edquota

d) quota

Answer: b) clearquota

Explanation: The clearquota command is used to reset disk quotas for users in UNIX.


38. What is the purpose of the -n option in the quotacheck command?

a) Check quota usage

b) Create new quota file

c) Do not update quota file

d) Update quota file

Answer: c) Do not update quota file

Explanation: The -n option of the quotacheck command is used to perform a dry run and not update the quota file in UNIX.


39. Which command is used to set disk quotas for a specific project in UNIX?

a) setprojquota

b) projquota

c) edquota

d) quota

Answer: a) setprojquota

Explanation: The setprojquota command is used to set disk quotas for a specific project in UNIX.


40. What is the purpose of the -a option in the quota command?

a) Display all quotas

b) Display user quotas

c) Display group quotas

d) Display summary information

Answer: a) Display all quotas

Explanation: The -a option of the quota command is used to display all quotas in UNIX.


41. Which command is used to set soft limits for disk quotas in UNIX?

a) softquota

b) edquota

c) setquota

d) limits

Answer: b) edquota

Explanation: The edquota command is used to set soft limits for disk quotas in UNIX.


42. What is the purpose of the -r option in the df command?

a) Display total disk space

b) Display total disk usage

c) Display usage for remote file systems

d) Display usage for local file systems

Answer: c) Display usage for remote file systems

Explanation: The -r option of the df command is used to display disk usage for remote file systems in UNIX.


43. Which command is used to display disk space usage statistics for a specific file or directory in UNIX?

a) diskspace

b) spaceusage

c) du

d) diskusage

Answer: c) du

Explanation: The du command is used to display disk space usage statistics for a specific file or directory in UNIX.


44. What is the purpose of the -v option in the quotacheck command?

a) Perform a verbose check

b) Perform a quick check

c) Verify quota file integrity

d) Display version information

Answer: a) Perform a verbose check

Explanation: The -v option of the quotacheck command is used to perform a verbose check, displaying detailed information during the process in UNIX.


45. Which command is used to display disk space usage for a specific user in UNIX?

a) spaceusage

b) usage

c) du

d) diskusage

Answer: c) du

Explanation: The du command is used to display disk space usage for a specific user in UNIX.


46. What is the purpose of the -f option in the quotacheck command?

a) Specify quota file location

b) Perform a fast check

c) Display quota file contents

d) Check file system integrity

Answer: a) Specify quota file location

Explanation: The -f option of the quotacheck command is used to specify the location of the quota file in UNIX.


47. Which command is used to display disk space usage statistics for the specified directory and its subdirectories in UNIX?

a) diskspace

b) spaceusage

c) du -h

d) du -d

Answer: d) du -d

Explanation: The du command with the -d option is used to display disk space usage statistics for the specified directory and its subdirectories in UNIX.


48. What is the purpose of the -P option in the du command?

a) Display usage in human-readable format

b) Include hidden files

c) Follow symbolic links

d) Display usage in kilobytes

Answer: c) Follow symbolic links

Explanation: The -P option of the du command is used to follow symbolic links and calculate disk space usage accordingly in UNIX.


49. Which command is used to display disk space usage for a specific group of users in UNIX?

a) groupusage

b) groupdu

c) dgroup

d) du

Answer: d) du

Explanation: The du command is used to display disk space usage for a specific group of users in UNIX.


50. What is the purpose of the -g option in the quota command?

a) Display group quotas

b) Display user quotas

c) Display disk usage

d) Display summary information

Answer: a) Display group quotas

Explanation: The -g option of the quota command is used to display group quotas in UNIX.

Related Articles

Linux MCQ

Welcome to Linux Multiple Choice Questions (MCQ) Section Embark on a journey through the world of...