shell scripting

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter20: Queuing Theory
Section20.10: Exponential Queues In Series And Open Queuing Networks
Problem 11P
icon
Related questions
Question

shell scripting

Assume that you were a system admin. Your team was assigned with gathering information of disk
space in use. In particular, you are charged with writing a shell script called quota. sh to determine how
much a particular directory has consumed its disk quota. To make this information easy to understand,
we classify a directory as follows:
• Small if the directory uses less than 128 kB disk space
• Medium if the directory uses less than 1 MB disk space
• Large if the directory uses equal to or more than 1 MB disk
space
Expected output Given a directory, the script should output the classification of the directory's size as
Low, Medium, or High. For those directory that is classified as Low, append the path to the directory you
tested to ~/ListOfSmallDirs.txt.
> ./quota.sh /usr/bin
High
[and then append /usr/bin to ~/ListOfBigDirs.txt]
> ./quota.sh /tmp
Low
Transcribed Image Text:Assume that you were a system admin. Your team was assigned with gathering information of disk space in use. In particular, you are charged with writing a shell script called quota. sh to determine how much a particular directory has consumed its disk quota. To make this information easy to understand, we classify a directory as follows: • Small if the directory uses less than 128 kB disk space • Medium if the directory uses less than 1 MB disk space • Large if the directory uses equal to or more than 1 MB disk space Expected output Given a directory, the script should output the classification of the directory's size as Low, Medium, or High. For those directory that is classified as Low, append the path to the directory you tested to ~/ListOfSmallDirs.txt. > ./quota.sh /usr/bin High [and then append /usr/bin to ~/ListOfBigDirs.txt] > ./quota.sh /tmp Low
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Networking
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole