Q2 Directory Space Usage.attaching the PDF 2 Directory Space Usage [35 Marks] In this question, you have
Fantastic news! We've Found the answer you've been seeking!
Question:
Q2 Directory Space Usage.attaching the PDF
Transcribed Image Text:
2 Directory Space Usage [35 Marks] In this question, you have to write a program (myDU. c) that finds the space used by a directory (including its files, sub-directories, files in sub-directories, sub-sub directories etc.). Let's call this directory as the Root directory. Syntax $./myDU Example Documents (4096 bytes) Bill Payment.pdf (2324 bytes) Experiment_Results.txt Office (4096 bytes) (178 bytes) Deals.ppt (9590 bytes) $./myDU Documents 20284 Note: 4096 + 2324 + 178 + 4096 +9590 = 20284 bytes Figure 1: Example to illustrate the use of directory space usage finding utility Figure 1 shows the structure of a directory called Documents which is the designated Root directory in this example. This directory contains files such as Bill Payment.pdf, Experiment Results.txt and a sub-directory called Office. The Sub-directory Office contains a file named Deals.ppt. To find the size of the Documents directory, its name is passed to your directory space usage finding utility as ($./myDU Documents). Your utility is expected to print the total size of the contents of the passed root directory in bytes (For eg: 20284). Note that, this is inclusive of directory sizes. 2 Directory Space Usage [35 Marks] In this question, you have to write a program (myDU. c) that finds the space used by a directory (including its files, sub-directories, files in sub-directories, sub-sub directories etc.). Let's call this directory as the Root directory. Syntax $./myDU Example Documents (4096 bytes) Bill Payment.pdf (2324 bytes) Experiment_Results.txt Office (4096 bytes) (178 bytes) Deals.ppt (9590 bytes) $./myDU Documents 20284 Note: 4096 + 2324 + 178 + 4096 +9590 = 20284 bytes Figure 1: Example to illustrate the use of directory space usage finding utility Figure 1 shows the structure of a directory called Documents which is the designated Root directory in this example. This directory contains files such as Bill Payment.pdf, Experiment Results.txt and a sub-directory called Office. The Sub-directory Office contains a file named Deals.ppt. To find the size of the Documents directory, its name is passed to your directory space usage finding utility as ($./myDU Documents). Your utility is expected to print the total size of the contents of the passed root directory in bytes (For eg: 20284). Note that, this is inclusive of directory sizes.
Expert Answer:
Related Book For
Statistics For Managers Using Microsoft Excel
ISBN: 9780133130805
7th Edition
Authors: David M. Levine, David F. Stephan, Kathryn A. Szabat
Posted Date:
Students also viewed these algorithms questions
-
Microkernel operating systems aim to address perceived modularity and reliability issues in traditional "monolithic" operating systems. (i) Describe the typical architecture of a microkernel...
-
How do complementary assets and social complexity influence a firm's organization?
-
Drop a book and a sheet of paper, and you'll see that the book has a greater acceleration-g. Repeat, but place the paper beneath the book so that it is forced against the book as both fall, so both...
-
The March bank statement showed the following for Yap Co.: Additional information: 1. The bank statement contained three debit memoranda: ? An NSF cheque of $595 that Yap had deposited was returned...
-
What is priming? Why priming is required in a centrifugal pump?
-
On April 30, 2007 Hackman Corporation issued $1 million face value 12% bonds dated January 1, 2007, for $1,023,000 plus accrued interest. The bonds pay interest semiannually on June 30 and December...
-
Describe the situation from either your professional experience or your research in which unethical or fraudulent behavior occurred. If you are describing an example from experience, please do not...
-
Suppose this morning SPB Ltd., a solar panel and battery manufacturing company, paid a dividend of $5 per share. At 10 a.m. SPB announced its latest earnings results (which were unexpectedly good)...
-
"What categorizations encompass the diverse array of CPU registers typically integrated within the architecture of an operating system?"
-
3. For each of these arguments determine whether the argument is correct or incorrect and explain why. a) Everyone enrolled in the university has lived in a dormitory. Mia has never lived in a...
-
Culture is often influenced by the media and images or messages that are transmitted throughout society. Within these images, stereotypes are often used to deliver a message. Understanding what a...
-
1. Using the data on material handling, use regression software such as Microsoft Excel to complete the missing data in the table below (round regression parameters to the nearest cent and other...
-
what extent do cultural norms and socialization processes shape the development of empathy, and how might cross-cultural variations in empathic tendencies inform our understanding of human universals...
-
Develop a Blockchain trade finance program/ application that will solves some of the inefficiencies in the provision of trade finance services. What is the value creation proposition and "pain point"...
-
3) Mabel bought new laptops at a cost of $5000 at 10% add-on interest for 5 years. Find the APR.
-
A fast-food restaurant averages 150 customers per hour. The average processing time per customer is 90 seconds. a. Determine how many cash registers the restaurant should have if it wishes to...
-
Consider a contingency table with two rows and five columns. a. How many degrees of freedom are there in the contingency table? b. Determine the critical value for a = 0.05. c. Determine the critical...
-
Assume that two samples are selected from independent normally distributed populations. a. At the 0.05 level of significance, is there evidence of a difference between 21 and 22 b. Suppose that you...
-
Can you use Twitter activity to forecast box office receipts on the opening weekend? The following data (stored in Twitter Movies) indicate the Twitter activity ("want to see") and the receipts ($)...
-
Presented below is information for Bach Chocolatiers for the month of March 2025. Instructions a. Prepare an income statement. b. Prepare a comprehensive income statement. c. Compute the gross profit...
-
The trial balance columns of the worksheet for Barbosa Apparel at June 30, 2025, are as follows. Other data: Operating expenses incurred on account, but not yet recorded, total R$1,640. Instructions...
-
In 2025, Endeaver Cameras had net sales of 860,000 and cost of goods sold of 533,200. Operating expenses were 221,000, and interest expense was 7,000. Instructions a. Compute Endeavers gross profit....
Study smarter with the SolutionInn App