Question: Unix Homework Help Write a script using the bash shell to find and print a long listing for all files that are over a specified
Unix Homework Help

Write a script using the bash shell to find and print a long listing for all files that are over a specified size and files that were modified more than a specified number of days ago. Each section of files listed should be preceded by a heading indicating what listing follows. The usage of this script should be Filename.bash [starting directory] [minimum filesize in KB] [age for files in days] Note that all command-line arguments are optional. If you don't include the command-line argument, the following defaults should be used in the script: Directory - current directory Minimum filesize - 1 KB Age for files - 90 days Requirements for the script: Must have a usage clause Must accept up to three arguments, but can accept zero Must use a case statement for assigning CLAs/default values to variables Must use the find command without the -exec or -ls options Must use a for loop to process files returned by find Write a script using the bash shell to find and print a long listing for all files that are over a specified size and files that were modified more than a specified number of days ago. Each section of files listed should be preceded by a heading indicating what listing follows. The usage of this script should be Filename.bash [starting directory] [minimum filesize in KB] [age for files in days] Note that all command-line arguments are optional. If you don't include the command-line argument, the following defaults should be used in the script: Directory - current directory Minimum filesize - 1 KB Age for files - 90 days Requirements for the script: Must have a usage clause Must accept up to three arguments, but can accept zero Must use a case statement for assigning CLAs/default values to variables Must use the find command without the -exec or -ls options Must use a for loop to process files returned by find
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
