[Solved]1 Write Shell Script Search List Directories Interactively Find Space Recover Space Could Q37281118

1. Write a shell script to search through a list of directories and interactively find space to recover. Space could be recovered in several ways, but only with the user’s confirmation for hle removal squeeze [-s size] [-d days] [directory.1 …] The script is actually 2 scripts. The top level script is called squeeze and uses find level script which should be n The size and days options should be set using getopts inside squeeze. If size is omitted it should be set to 1000000. If days is omitted it should be set to 10. If there are no directories use the current directory. These options should be used with find to locate hles which are either that size or larger or else modified at a time older than days number of days or named core or a.out. The squeeze.file script will be called with the name of 1 file which is either old or large or both. Inside squeezefile you should present the file to the user in a while true loop to allow the user to decide what to do. The user can use commands 1, m, o, r, g, or c to indicate “ls-l”, “more”, “od-x”, “rm” , “gzip” or “continue” Commands 1, m and o perform an action without exiting the loop. Commandsr, g and c perform an action and exit the loop. Actually c simply exits the loop. Command r should only be done after confirming through prompting and reading a y, with either lower case or upper case with possibly more letters following the y Show transcribed image text 1. Write a shell script to search through a list of directories and interactively find space to recover. Space could be recovered in several ways, but only with the user’s confirmation for hle removal squeeze [-s size] [-d days] [directory.1 …] The script is actually 2 scripts. The top level script is called squeeze and uses find level script which should be n The size and days options should be set using getopts inside squeeze. If size is omitted it should be set to 1000000. If days is omitted it should be set to 10. If there are no directories use the current directory. These options should be used with find to locate hles which are either that size or larger or else modified at a time older than days number of days or named core or a.out. The squeeze.file script will be called with the name of 1 file which is either old or large or both. Inside squeezefile you should present the file to the user in a while true loop to allow the user to decide what to do. The user can use commands 1, m, o, r, g, or c to indicate “ls-l”, “more”, “od-x”, “rm” , “gzip” or “continue” Commands 1, m and o perform an action without exiting the loop. Commandsr, g and c perform an action and exit the loop. Actually c simply exits the loop. Command r should only be done after confirming through prompting and reading a y, with either lower case or upper case with possibly more letters following the y
Expert Answer
Answer to 1. Write a shell script to search through a list of directories and interactively find space to recover. Space could be … . . .
OR

