Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment you will write a system utility that displays the space utilized by les within the current working directory. Each le and directory

In this assignment you will write a system utility that displays the space utilized by les within the current working directory. Each le and directory will be displayed, prexed by the space it takes up. Space will be displayed in a user-friendly format (e.g., B, K, MB). The utility will be recursive in that it lists the space used by les nested within a child directory in the current directory. Your program must compile and run under Xubuntu (or another variant of Ubuntu) 16.04. Sample output:

image text in transcribed

Specic Requirements: 1 The size of each directory should be calculated recursively. Calculations must include the size of folders themselves (4096 bytes). [8 points]

The list of entries should be alphabetized and case insensitive. (Implement a sorting algorithm.) [7 points]

Show the size of each entry in a user-friendly format: if it is less than 1024 bytes, show B for bytes. If it is less than 10242bytes, show K for kilobytes. Otherwise, show MB for megabytes. [5 points] When the command is executed at a directory, each le and directory within it is displayed. In addition, the contents of child directories is shown. [10 points]

Must show a . directory which is the size of everything in the current directory and all children (recursive). [5 points]

image text in transcribed

image text in transcribed

Fle Edt iew Terminal Tabs Hep rirtual Box:-/NetBeansProjects/CApplication 1s matn ruben@ruben-Vi 638 .dep.ic K /bu ld/Debug/GNU-Linux/main.o 78 2K /but ld/Debug/GNU-Linus/emain. 438 2 '/build/Debug/GNU Linux 1K Pout ld/Debug 3skbuld 9/dist/Debug/GNU-Linux/capplication1 23K /dist/Debug/GNU-Lin 2 ,/dist/Debug 1K /dist 9K-main 2K but ld/Debug/GNU-Linux/mn.o. main.c qurations 2K LK 4K abpraject/conti k abproject/makefite-Debug.ak boro ject/makefite-inpt.nk K bproject/Makefite-Release.sk LK mbprojectmakeite-variables.nk /mbproject/Package-Debug.bash boroject/Package-Release.bash mbproject/private/c standard headers indexer mbproject/private/comfigurationsxnt tk 2K kmbproject/private/cpp standard headers indexer.cpp 2K mbproject/private/launcher properties /mbproject/private/Makefile-variables.nk DSB .tprojec t/private/private.1 22KImbproject/private 9768 mbproject/project.m mbproject Pmemsi. 11K S3K

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

More Books

Students also viewed these Databases questions