CYSE 270: Linux System for Cybersecurity Lab 9 – Shell Scripting-Working with directory Please write shell scripts to complete the following tasks. Task A - Check files Write a script like below that...

1 answer below »
Screenshot each step as usual


CYSE 270: Linux System for Cybersecurity Lab 9 – Shell Scripting-Working with directory Please write shell scripts to complete the following tasks. Task A - Check files Write a script like below that 1. Gets the name of the directory as input (as shown in the screenshot here). 2. Your script should check for the validity of given directory name and pop out an error if an invalid directory name is entered. 3. You need to test the following directories with your script: • /etc/systemd • /home • A directory that does not exist 4. (Extra credit: 10 points) Display the contents for the directories you have entered (See the screenshot below) Task B - Create a new directory Write a shell script like below, that performs the following task: 1. Reads the name of the directory. 2. Check whether the given input is a directory or regular file. 3. If the input is a directory and it exists, then display the message “Directory exists. Do not create”. 4. If the input is a regular file, then display the message “Directory exists. Do not create”. 5. If the given input name in step-1 doesn’t exist, then create the new directory with the given name in step-1.
Answered Same DayMar 22, 2022

Answer To: CYSE 270: Linux System for Cybersecurity Lab 9 – Shell Scripting-Working with directory Please write...

Vibhav answered on Mar 22 2022
111 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here