Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Linux. Write a script to give me a list of all files in a directory hierarchy sorted by size. This implies that you should give

Linux.

Write a script to give me a list of all files in a directory hierarchy sorted by size. This implies that you should give me just the file names, and not the complete path, for all files in the specified directory as well as the subdirectories underneath. If there are any files with size zero, ask the user whether to delete those files (giving relative path name for the file, relative to current directory), and delete them if the user says yes. The script should allow for directories to be specified as command line parameters. Use the current directory as default if no directory is specified on the command line. The script should be named flcln.

Hint: Ill suggest looking for the find command and its various options to do this assignment.

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

Students also viewed these Databases questions