Question: 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
Get step-by-step solutions from verified subject matter experts
