Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help. I know that Filename.bash should start of like $0 [starting directory] [minimum filesize in KB] [age for files in day] How do I
Please help. I know that Filename.bash should start of like $0 [starting directory] [minimum filesize in KB] [age for files in day] How do I do this?
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 findStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started