In this section of your final project, you will write a basic script to create and back up files. You will create this script with the vi editor. The script will combine multiple commands and simplify a repeatable task. Your script should be named Firstname Lastname.BASH. Your script and your Linux directory structure should demonstrate that you have correctly written the script to do the following: Create files: In this section, you will demonstrate your ability to utilize various Linux commands to create text files. Create these files in the NEW directory. Ensure that the commands in your log file show that the following three text files were created using three different methods. Create the following files
XI A. A text file listing the quantity of operating system free space, titledFree_Space Content.txt B. A text file listing the directory contents of the OLD folder, titled OLD_Content.txt C. A text file showing the current month, day, and time (Title this fileTime File.tx.)
XI Modify and Move files: Utilize Linux commands to copy files to a different directory and renamethem A. Copy the following selected files from the OLD directory to the BACKUP directory. Ensure that you change the filename suffix fro XXX OLD to XXX BACKUP i. Free_Space_Content OLD.txt ii Directory Content OLD.txt i Time File OLD.txt Move all files from the NEW directory to the BACKUP directory (no renaming necessary). Clean up the Linux directory structure by deleting the items in the NEW directory B.

Answers

Answer 1

Answer:

bjdjdindbdubduf kndjnxjxjfujdjbdjbd bzjbd djbdibdu jdjdidnidndi xubdubdufjksk. xud ufbsjjdi djneibdudbdujfjfbjbdj fu. fjfjjdubdjjdbjd jdbdinkdkdnd. djjdibnfjdkndindundi jdudjbdubd djbdu bdudjdjjd djidndud dudbid anĂ­s us dj

Answer 2

Answer:

####Bash Script Start###################################

#######Please check the permissions on the folders inorder to make sure the script works

#!/bin/bash

if [ ! -d NEW ]; then

mkdir -p NEW;

fi

df > "NEW/Free_Space_Content.txt"

touch "NEW/OLD_Content.txt" | ls -l OLD > "NEW/OLD_Content.txt"

> "NEW/Time_File.txt" | date +"%B %c" > "NEW/Time_File.txt"

cp "OLD"/*.txt "BACKUP"

rename OLD BACKUP "BACKUP"/*.txt

mv "NEW"/*.txt "BACKUP"

#############Bash Script End##################################

########Script_Assessment.txt#####################

Commands which were used to create files:

touch filename

command > filename

> filename

Directory and its contents:

NEW: Contained the newly created file

OLD: Contained sample files with OLD suffix

BACKUP: Contains all the files moved from NEW and OLD directories

Free_Space_Content.txt contains the disk info such as used and free space

OLD_Content.txt contains the directory contents info of OLD directory

Time_File.txt : Contais the current month, day and time info

Explanation:


Related Questions

Other Questions
Do you think that the same principles of wildlife management apply to marineecosystems? Why or why not?| Find the area of the figure below in square centimeters. 10 cm 3cm 4 cm 6 cmUrgent Please Help What is the perimeter? The Mayan civilization a. lasted about 1,000 years. b. hit its peak about A.D. 750. c. was defeated by the Aztecs. d. came to a mysterious end. What is the difference between relative and absolute poverty? A scalene triangle is rotated 90 clockwise about the origin. Which of the following statements is not true? A. The new triangle is the same size as the original triangle. B. The new triangle is the same shape as the original triangle. C. The x-coordinates of the new triangle are the same as the x-coordinates of the old triangle. Help !!! What happens if you disconnect a circuit from its positive terminal BrainPOP question please help asap! ill give brainliest to the right answer Determine the amount of torqueapplied by a 1.0 m long pry bar with250 N of force acting on it. Assumethat the angle is 90. Write an equation of the line that passes through point P and is parallel to the line with the given equation. P(3,5); y=2x-6 Referring to the book "Nexctar in a Sieve" In at least one hundred words, describe how what Markandaya reveals about Kenny helps to shape his character, and which themes in Nectar in a Sieve are developed with this information. Help me if u known Spanish At a swim meet 20 medals were a warded. Four were gold metals 45% of the metals were silver the rest were bronze. What percent of the medals awarded were bronze The figures are similar. Find x 1. What two chemical content(s) of mast cells enable them to exhibit their unique property on mesentry spread (slides)2. What naturally occurring substance shares the properties of and elastic fibre3. Give one difference between dense and loose connective tissues, which is observable under the microscope4. Give one difference between regular and irregular dense connective tissues which is observable under the microscope Pauley graphs the change in temperature of a glass of hot tea over time. He sees that the function appears to decrease quickly at first, then decrease more slowly as time passes. Which best describes this function?A.) It is linear because the graph decreases over time.B.) It is linear because there is both an independent and a dependent variable.C.) It is nonlinear because linear functions are increasing functions.D.) It is nonlinear because linear functions increase or decrease at the same rate.please help meeeeee :) The voltage across the diode indicates the energy given to charge carriers (electrons and holes, but more about that later in the course.) If the diode turns on at X volts, then the charge carriers are getting X electron-volts of energy. The charge carriers can give up this energy by emitting a photon. How does the energy the charge carriers get at the turn-on voltage compare to the energy of a red photon please help me!!!!!!!! essay about an assignment in art Which of these statements is false? A. Atoms of different elements can combine to form compounds. B. Oxygen and copper are examples of elements. C. Atoms of different elements are the same. D. Elements are pure substances.