Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

a. Explain clearly what is the function of the utility fsck? b. Explain, with th

ID: 3857943 • Letter: A

Question

a. Explain clearly what is the function of the utility fsck?

b. Explain, with the help of screenshots, what happens if you issue the command without

    any options. Explain why it may become damaging to the existing file systems.

c. What is one option that you may use to exclude check on the existing mounted file

    system?

d. What is the option that you use to auto repair file system when errors are detected?            e. How to force fsck to run every time during boot up?                                    [5 marks]

Explain what does ~/.bashrc contain? Provide a screenshot that displays the content of ~/.bashrc in your system.                                                                              [5 marks]

What is the function of a ~/.bash_profile? Explain clearly how the scripts in ~/.bash_profile and ~/.bashrc differ.                                                              [5 marks]

Explain clearly, with appropriate screenshots, what does the /proc contain. Use the command line to display information about the CPU and RAM.                        [5 marks]

Explain clearly the function of mount utility.                                                [5 marks]

Explain why it is not a good idea to mount anything on root (/).                   [5 marks]

a. What happens if you issue a command to unmount a system that is currently in use?

                                                                                                                 [3 marks]

b. How could you kill the process(es) that is (are) using the system and unmounts the system?                                                                                                                     [1 mark]

c. How could you umount all mounted systems that are not in use?                      [1 marks]

a. What is the purpose of the utility du?                                                  [2.5 marks]

b. What are the different options that you could use with du? Explain the purpose of these options.                                                                                                   [2.5 marks]

a. What is the purpose of fstab?                                                                [2.5 marks]

b. Explain the contents of 6 columns that it usually displays.                    [2.5 marks]

                                                                                                                     

     10. Explain the main functions of the utility yum.                                             [5 marks]

Explanation / Answer

1. Function of the utility fsck:

fsck, similar to chkdsk in windows, checks and repairs the file system in Unix & Linux operating systems. Linux fsck utility is used to check and repair Linux filesystems (ext2, ext3, ext4, etc.).

fsck operates in two modes interactive and non interactive. In interactive mode, fsck examines the file system and stops at each error it finds in the file system and gives the problem description and ask for user response whether to correct the problem or continue without making any change to the file system.

In non-interactive mode, fsck tries to repair all the problems it finds in a file system without stopping for user response useful in case of a large number of inconsistencies in a file system but has the disadvantage of removing some useful files which are detected to be corrupt .

The following are the possible exit codes for fsck command.

2.

Issuing commands without options damage the file system. This phenomena aises when the paricular file system is in mount state or it has softlink to another file system. We have to make sure in using appropriate options. A directory entry consists of a filename and the number of the inode which represents the file. The inode contains the numbers of several data blocks, which are used to store the data in the file.

3.

du -ch --exclude is the command used to exclude specific folders in checking and excluding while the specific file system is in mount state.

Mount all the file systems listed in /etc/fstab, except those marked as “noauto”, excluded by the -t flag, or those that are already mounted.

4.

During the filesystem check, if errors are detected, you can get “fsck” to auto repair the filesystem with the -a flag. F

For auto-reparing with out user intervene we can check the errors by these commands.

fsck -a /dev/sda1

Similarly, using the -y flag can get the job done as well:

fsck -y /dev/sda1

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote