Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This exercise is mainly focused on more advanced aspects of Linux shell programming. TASKS Typically, in time every Linux system has a number of symbolic
This exercise is mainly focused on more advanced aspects of Linux shell programming.
TASKS
- Typically, in time every Linux system has a number of symbolic links that are no longer tied with any existing file. This may happen due to various reasons, but ultimately this situation is something that system admin has to deal with. Very frequently the administrator decision is to delete such links. Your task is to write a script which would remove all symbolink links (symlinks) which are linked to no longer existing files / directories. The operation should be performed in the directory specified as the script execution parameter. NO READ COMMAND IN THE NON_INTERACTIVE VERSION AND NO INFINITE LOOPS IT WILL HANG SCRIPTCHECK!
Assuming the script name is scr1and the directory you want to delete the symlinks is Dir, the script should be executed as:
./scr1 dir_name
Step 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