Question: Linux/Unix 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/Unix
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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
