Write down script to report cumulative size of all files

Assignment Help Programming Languages
Reference no: EM1371936

Write a script that will report the cumulative size of all the files in and below a given directory. Your script will also report the name and size (in bytes) of the largest file with that directory tree. Your script will also report the percentage of space used (for that "largest" file) relative to the total cumulative size of all files. In this case, only select plain files (no symbolic links or directories).

Your script will accept a single directory argument. You script will perform argument checking to make sure that there is only one argument and that the argument is an existing directory. Your script needs to handle the cases when all the file sizes are zero or the given directory is empty. In other words, watch out for divide by zero errors. Use the find command to traverse the directory and search for "plain files" and generate the "long listing" for each file. Use the awk command to calculate the sum of the file sizes.

Test your script.

You may use the touch command to create a file with a specific size (see the man page). Be careful not to exceed any disk quota that may have been imposed on your account by the system admin.

Reference no: EM1371936

Questions Cloud

Computing optimal level of input required : Suppose ZCorp has following short run production function Q = 50X - 2X^2 where X is the only variable input used by ZCorp to product its product, Q.
Program to compute gross wages for employee using array : Write program which uses the following arrays: payRate: array of seven floats to hold each employee's hourly pay rate. wages: array of seven floats to hold each employee's gross wages.
Reward system and financial reporting act : Would the reward system vary among retailers, manufacturers, distributors, financial organizations? What other characteristics should good performance incentives have?
Explain the term stereotype threat : Explain what the term "Stereotype Threat" that happens to an individual of a different cultural when they are trying to take an IQ test.
Write down script to report cumulative size of all files : Write down script which will report cumulative size of all files in and below given directory. Your script will also report name and size (in bytes) of largest file with that directory tree.
Fallacies and consequences-race and ethnicity : Reflect upon the Individualistic Fallacy, Legalistic Fallacy, and Ahistorical Fallacy. Relate these fallacies to the information you learned from the video. Why might these fallacies exist? What are the consequences of these fallacies?
Labor supply curve for cashiers : In Chicago 120 people are wants to work as cashiers if the wage is $6 a hour. For each $1 that the wage rises above $6 an additional 40 people are wants to work as cashiers.
Conflict theory-relevance today : Conflict theory suggests that the rich (powerful) make rules and enforce them against the poor (powerless). Does this theoretical perspective seem relevant today? Please cite the recent incident (political or otherwise) that would support your arg..
Find the technical rate of substitution : Suppose a company that uses two inputs. The quantity used of input 1 is denoted by x_1 and the quantity used of input 2 is denoted through x_2.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd