A bash script to print information about filespace objects

Assignment Help Computer Engineering
Reference no: EM132193732

Question :

Write a Bash script to print information about filespace objects.

The script is to take a list of file system objects on the command line.

If there are no arguments to the script, it should treat the list as being the directory ‘.'.

For each object in the list, I want you to call the function below with the object as the argument.

I want you to write a function taking a single argument.

• if the argument is a regular file, you are to print the name of the file, its size, and the type of the contents as reported by the file command. [The commands cut or sed may be useful.

• if the argument is a symbolic link, print the name, "symbolic link " and the name of the linked-to file [look at the output of "ls -l"]

• if the argument is a directory, do the same things on the objects in the directory (where the file name is to include the directory name) [recursion]

• if the argument is anything else, print the name and "unknown".

Reference no: EM132193732

Questions Cloud

Create a linked list of students : Create a linked list of students. Each entry in the list must contain the student name, the final average, and a pointer to the next student record.
Create a vector of n random numbers between min and max : Write a C/C+ program that uses a random number generator to create a vector of N random numbers between MIN and MAX.
Analyze the poem below for use of imagery : Analyze the poem below for its use of imagery, metaphor and tone, and how they help us understand the theme. You will be graded in the following areas.
Analyze the colors used in the rooms and objects : Analyze the colors used in the rooms and objects in Poe's "Masque of the Red Death." What do they represent? Who do you think is the narrator?
A bash script to print information about filespace objects : Write a Bash script to print information about filespace objects. The script is to take a list of file system objects on the command line.
Test status of communication with a host provided by user : Display whether a file in present working directory is an ordinary file or a directory. If it is a file, it will create a backup copy of a file with extension .
What is the opportunity cost of one pound of electronics : Trade and Growth - What is the opportunity cost (in soybeans) of producing one one pound of electronics in China and Brazil
Describe the sampling strategy and sampling technique : Provide a brief review of the study. Describe the sampling strategy and sampling technique. Describe the research design.
Write a bnf description for a statement-sequence : Write a BNF description for a statement-sequence as a sequence of statements in which each statement is terminated by a semicolon.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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