1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DanielleElmas [232]
3 years ago
11

In this section of your final project, you will write a basic script to create and back up files. You will create this script wi

th 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.
Computers and Technology
2 answers:
myrzilka [38]3 years ago
6 0

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:

Viktor [21]3 years ago
4 0

Answer:

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

You might be interested in
One of the difficult decisions a systems analyst has to make when it comes to software is whether to recommend making, buying, o
Mademuasel [1]

Answer:

Explanation:

There are different advantages to buy commercial software like:

- Is a system used for other companies, we will have good referents with the feedback of them.

- Support, we should have support twenty-four hours, if a system doesn't have good support, we must not buy the software.

- We can choose software with a lower initial cost, this depends on our needs.

3 0
2 years ago
An operating system coordinations the___ of a computers operation
qwelly [4]
\\\\\\\\\\\\\\\\\\\\\\\\\Operating system///////////////////////
                            Is the Answer
8 0
3 years ago
Write an efficient C++ function that takes any integer value i and returns 2^i ,as a long value. Your function should not multip
Ilya [14]

Answer:

long power(int i)

{

   return pow(2,i);

}

Explanation:

The above written function is in C++.It does not uses loop.It's return type is long.It uses the function pow that is present in the math library of the c++.It takes two arguments return the result as first argument raised to the power of second.

for ex:-

pow(3,2);

It means 3^2 and it will return 9.

4 0
3 years ago
WILL UPVOTE ALL plz
evablogger [386]
Ash is the answer. Hope this helps
4 0
3 years ago
Select the correct answer.
goblinko [34]

Answer:

b

Explanation:

8 0
2 years ago
Other questions:
  • Windows enables each user to establish a ____, which identifies to windows the resources, such as apps and storage locations, a
    6·1 answer
  • While engineers work to create computers that can understand us emotionally, ________ are also evolving toward a more human appe
    12·1 answer
  • Does Logarithms and Algorithms same things?
    6·1 answer
  • What is a good voltage measurement on a brand new, 6 volt golf cart deep cycle battery after the first charging?
    10·1 answer
  • if your instructors teaching style is very different from your learning preference your best choice is to one work on your weake
    10·1 answer
  • How to use repl.it css
    7·1 answer
  • Which operating system (OS) is used to run your laptop?
    15·2 answers
  • How many times is the body of the loop executed?
    8·1 answer
  • Question:
    14·1 answer
  • Why are men more exposed to mass media?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!