Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Bash script that takes the name of a file or directory as an argument reports if it is a directory or a file,

Write a Bash script that takes the name of a file or directory as an argument reports if it is a directory or a file, and if the user has read, write and execute permission on the file or directory if it is a file, reports the size of the file and the category of the file based on its size. If the file size is greater than 1MB (1048576B), the file is a large file; if the file size is less than or equal to 1MB (1048576B) and the file size is greater than 100KB (102400B), the file is a medium file; otherwise, it is a small file. Use a sequence of if statements on the file name or file size to determine the information. To get the file size, use command du -b and command cut. Read their manual for how to use them.

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_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

50. Prove the result in the second proposition, MaXb (t) ebtMX(at).

Answered: 1 week ago