Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Writing script in linux using bash. Write a utility to collect well-known files into convenient directory holders. collect * The utility should collect all executables,

Writing script in linux using bash.

Write a utility to collect well-known files into convenient directory holders.

collect *

The utility should collect all executables, libraries, sources and includes from each directory given on the command line or entered by the user (if no arguments were passed) into separate directories. By default, the allocation is as follows:

executables go to ~/bin

libraries (lib*.*) go to ~/lib

sources (*.c, *.cc, *.cpp, *.cxx) go to ~/src

includes (*.h, *.hxx) go to ~/inc

The utility should ask whether another directory should be used in place of these default directories.

Each move should be recorded in a log file that may be used to reverse the moves (extra points for writing a reverse utility!). The user should have an option to use a log file other than the default (~/organize.log).

At the end, the utility should print statistics on file allocation: how many directories were processed, how many files in each category were moved and how long the reorganization was (the processing time in seconds).

The utility should wait only limited time for user input; if no input, then use defaults.

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

What conditions must be met for a component unit to be blended?

Answered: 1 week ago

Question

l Discuss three types of individual incentives.

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago