Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Working individually you are to create three scripts. These scripts will perform the functions described below. Script 1: Perform a ls -al on the files

Working individually you are to create three scripts. These scripts will perform the functions described below.

Script 1:

  1. Perform a ls -al on the files within the user's home directory and save it to a file called ls.dat within your ~ directory
  2. Save the tree information for the /home directory in a file called tree.dat within your ~directory
  3. Create a new directory in your home directory called "backups"
  4. Move the files you just created to the new directory
  5. Rename the files that you just moved to "ls.bu" and "tree.bu".

Script 2:

  1. Ask the user for their name
  2. Create a file called "daily.dat" within the home directory
  3. Ask the user for a line of text that the system should save to the file
  4. Add to the file the line of text entered by the user
  5. Ask the user for a second line of text that the system should save to the file
  6. Append at the end of the file the line of text entered by the user
  7. Create a copy of the file in the directory "backups" within the home directory, renaming the file daily.bu.

Script 3:

  1. Ask the user for a file's name
  2. If the file exists, ask them if they would like to (C)opy, (M)ove, or (D)elete it by choosing C, M, or D
  3. If the user chooses C, ask for the destination directory and copy it there
  4. If the user chooses M, ask for the destination directory and move it there
  5. If the user chooses D, delete the file.

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

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions

Question

Develop successful mentoring programs. page 400

Answered: 1 week ago