can you help with this?


Scenario:

You must perform the following tasks on the VMware virtual machine assigned to you at the school (https://is20.fp.stlcc.edu).

Required Resources

Virtual computer on the VMware server

Part 1:

1. Install CentOS8.x operating system on the VMware virtual machine and name it midterm. (10 points)

2. Create the following user account: user name = Midterm20, password = Password20, set the root password to RootPassword. (5 points)

Part 2:

1. Log in as the user Midterm20, and perform the following tasks as this user. (1 point)

2. Create a new directory in the Midterm20 user ‘s home folder called: midterm. (2 points)

3. Navigate to the midterm directory. Perform all work in the midterm directory. (2 points)

4. List the detailed content of the “/etc” directory (include all hidden files in the listing, but do not include files from the sub-directories), and redirect the output into the file named “etcdir-file”. (10 points)

5. Separate out the directories into a new file called “onlydirectories”. (15 points)

Note: check https://www.cyberciti.biz/faq/grep-regular-expressions/

6. Separate out all files into a new file called “onlyfiles”. (15 points)

7. Sort the content of “onlyfiles” in reverse order based on the names, and name the output as “sortedfiles”. (15 points)

8. Sort the content of “onlydirectories” in reverse order based on the names, and name the output as “sorteddirectories”. (15 points)

9. Combine the “sortedfiles”, and “sorteddirectories” files into a new file called “combined” where the files are listed first, and directories listed second. (2 points)

10. Change the permissions on all the files in the midterm directory so only the owner of the file can read and write the files (all other permissions are denied). (2 points)

Note: You should have 6 files once you finished in the midterm directory. Your file sizes and dates will be different, but all other information should match with the following display:

-rw-------. 1 Midterm20 Midterm20 12865 Jun 4 19:01 combined

-rw-------. 1 Midterm20 Midterm20 6390 Jun 4 18:35 onlydirectories

-rw-------. 1 Midterm20 Midterm20 14291 Jun 4 18:26 etcdir-file

-rw-------. 1 Midterm20 Midterm20 6475 Jun 4 18:52 onlyfiles

-rw-------. 1 Midterm20 Midterm20 6390 Jun 4 18:59 sorteddirectories

-rw-------. 1 Midterm20 Midterm20 6475 Jun 4 18:58 sortedfiles