Write a bash script code that take any directory name as an input; then read and display the requested information. Your code should work as follow: 1. Take any directory name as input; ask the user to enter the directory name (or path). Find this directory on the running PC, if it does not exist display a message (the requested directory not found). 2. Count the number of (.png) files in this directory, and display it on the screen.  3. Display a list of files or subdirectory that was created after 10/10/2021. (Hint: your code must read the current date on the running PC then compares it with 10/10/2021). 4. Copy the files that its name begins with (A or a) to a new directory called (beginwith-A). (Note that your code should create this directory on the current working directory).

LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
5th Edition
ISBN:9781337569798
Author:ECKERT
Publisher:ECKERT
Chapter7: Working With The Bash Shell
Section: Chapter Questions
Problem 5DE
icon
Related questions
Question

Write a bash script code that take any directory name as an input; then read and display
the requested information. Your code should work as follow:


1. Take any directory name as input; ask the user to enter the directory name (or path).
Find this directory on the running PC, if it does not exist display a message (the
requested directory not found).


2. Count the number of (.png) files in this directory, and display it on the screen. 


3. Display a list of files or subdirectory that was created after 10/10/2021.
(Hint: your code must read the current date on the running PC then compares it with
10/10/2021).


4. Copy the files that its name begins with (A or a) to a new directory called (beginwith-A). (Note that your code should create this directory on the current working
directory). 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 5 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L