Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LINUX: In a learning environment, it's not uncommon to wind up crowded directories filled with a number of files for testing, empty files, and even

LINUX: In a learning environment, it's not uncommon to wind up crowded directories filled with a number of files for testing, empty files, and even empty directories. In this project, it is your task to create a command line interface that will continually prompt a user to see if they would like to:

List the files in the current directory

Provide a directory name and then a series of filenames to moved into their own directory.

Provide a name for a tar file, then a method of compression and then a series of filenames to be combined via tar.

Navigate to another directory specified by the user.

Search and list all empty files and directories within the working directory.

Exit the program

In some situations, your program should provide an error message:

If a user provides a file or directory name that does not exist, prompt the user with an error message and reprompt the user for the proper file names. It should also log an error message by appending to a file "logerr.txt" an appropriate message.

Your script should terminate with an error message if one of the inputs given to it contains a semicolon or a | symbol. It should also log an error message by appending to a file "logerr.txt" an appropriate message.

Bonus: [10 extra points] Capture the SIGINT signal and call a function to say goodbye to the user before terminating. I suggest as in the previous project, to do this incrementally.

Implement your menu and have it take selections but do nothing else.

Have your script execute options 1, 4 and 6 (the easier ones I would say)

Add error checking for a file or directory that does not exist, put that error in the log

Add error checking for ; or | in input, put that error in the log

Implement option 2 and 3

Implement option 5.

If you still have time, implement the extra credit by trying to capture the SIGINT signal (Ctrl-C) sent by user and output an appropriate message before terminating.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago