Write a program that performs the following operations according to the input value with Linux Bash Script. [1] Create a file for a given filename and list the generated file in a long format [2] Delete a file for a given filename [3] Copy a file content to another file [4] Listsubdirectories of a current directory recursively [5] Generate the command that finds how many times the "cat" command has been used in your command history so far. [6] Generate the command that writes the file names starting with W in the active directory to the "Files.txt" file.    should be solved using Linux Bash Scripting solution code and one/two screenshots for running of program.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.1: I/o File Stream Objects And Functions
Problem 10E
icon
Related questions
Question

Write a program that performs the following operations according to the input value with Linux Bash Script.

[1] Create a file for a given filename and list the generated file in a long format

[2] Delete a file for a given filename

[3] Copy a file content to another file

[4] Listsubdirectories of a current directory recursively

[5] Generate the command that finds how many times the "cat" command has been used in your command history so far.

[6] Generate the command that writes the file names starting with W in the active directory to the "Files.txt" file.

 

 should be solved using Linux Bash Scripting

solution code and one/two screenshots for running of program.

Question 2. Write a program that performs the following operations according to the input value with
Linux Bash Script.
[1] Create a file for a given filename and list the generated file in long format
[2] Delete a file for a given filename
[3] Copy a file content to another file
[4] List subdirectories of current directory recursively
[5] Generate the command that finds how many times the "cat" command has been used in your
command history so far.
[6] Generate the command that writes the file names starting with W in the active directory to the
"Files.txt" file.
Sample output:
idris@idris-VirtualBox:-/Desktop$ bash mybash.sh
[1] Create a file for a given filename and list the generated file in long format
[2] Delete a file for a given filename
[3] Copy a file content to another file
[4] List subdirectories of current directory recursively
[5] Generate a command that finds jow many times the cat command has been used in command hi
story
[6] Generate a command that writes the file names starting with letter W in the active direc
tory to the Files.txt file
Select your operation: 1
Write a file name to create: lectureNotes.txt
lectureNotes.txt file is created.
-rw-rw-r-- 1 idris idris 0 Oca 7 16:47 lectureNotes.txt
Transcribed Image Text:Question 2. Write a program that performs the following operations according to the input value with Linux Bash Script. [1] Create a file for a given filename and list the generated file in long format [2] Delete a file for a given filename [3] Copy a file content to another file [4] List subdirectories of current directory recursively [5] Generate the command that finds how many times the "cat" command has been used in your command history so far. [6] Generate the command that writes the file names starting with W in the active directory to the "Files.txt" file. Sample output: idris@idris-VirtualBox:-/Desktop$ bash mybash.sh [1] Create a file for a given filename and list the generated file in long format [2] Delete a file for a given filename [3] Copy a file content to another file [4] List subdirectories of current directory recursively [5] Generate a command that finds jow many times the cat command has been used in command hi story [6] Generate a command that writes the file names starting with letter W in the active direc tory to the Files.txt file Select your operation: 1 Write a file name to create: lectureNotes.txt lectureNotes.txt file is created. -rw-rw-r-- 1 idris idris 0 Oca 7 16:47 lectureNotes.txt
Expert Solution
steps

Step by step

Solved in 3 steps with 2 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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr