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
A package that includes hardware, software, and support from a single vendor is called a(n ____ package.
dmitriy555 [2]
The appropriate response is turnkey. It is a kind of venture that is built so it can be sold to any purchaser as a finished item. This is stood out from work to request, where the constructor fabricates a thing to the purchaser's correct determinations, or when an inadequate item is sold with the supposition that the purchaser would finish it.
6 0
3 years ago
failure of the _ cylinder will often result in sudden unexpected loss of the ability to stop the vehicle
grin007 [14]

Failure of the <u>Brake master </u>cylinder will often result in sudden unexpected loss of the ability to stop the vehicle

<u>Explanation:</u>

The ability to stop the vehicle lies with the Brakes. If brakes of a vehicle do not work properly then it might become difficult to stop the vehicle. This happens when a cylinder called brake master cylinder fails.

The brake master cylinder might not work properly with the passage of time or it can form internal leaks. This is the master cylinder and it controls other cylinders in a vehicle. Its failure affect the brakes badly, it will be unsafe to drive such a vehicle.

5 0
3 years ago
Your first submission for the CIS 210 Course Project should include the following functionality: - Requests the user to input hi
Viefleur [7K]

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 String name;

 System.out.print("First name: ");

 name = input.next();

 name= name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();

 System.out.print(name);

}

}

Explanation:

This declares name as string

 String name;

This prompts the user for first name

 System.out.print("First name: ");

This gets the name from the user

 name = input.next();

This capitalizes the first letter of name and makes the other letters to be in lowercase

 name= name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();

This prints the formatted name

 System.out.print(name);

5 0
3 years ago
Help me plssssss which rule should be followed to stay safe online
max2010maxim [7]

Answer:

B: Avoid Sharing Photos

Explanation:

If you send a photo to a person, you need to be very careful not to send something that can give your information away, this includes but it not limited to Pictures of your town, Pictures of You, Pictures of Friends, Pictures of Family, etc.

Hope I could help!!

7 0
3 years ago
Read 2 more answers
Select all that apply.
Valentin [98]

Answer:

1, 3, & 4.

Is the way to do so. Good luck.

6 0
3 years ago
Other questions:
  • What does &lt;3 mean at the end of a message?
    9·1 answer
  • What's the name of this apex legend hero​
    13·2 answers
  • If your problem is caused by a bad hardware or software installation and you get an error message the first time you restart the
    6·1 answer
  • Directory servers from different vendors are synchronized through ________.
    9·1 answer
  • My friend has 200 subs and i have only 36 can you help me its ACYT ZR
    9·2 answers
  • By convention only, either the first usable address or the last usable address in a network is assigned to the router (gateway)
    11·1 answer
  • Explain any two features of a computer​
    15·1 answer
  • Question 3 of 10<br> What was the fly in the ointment of Timmy's friendship with Rollo?
    10·1 answer
  • A _____ standard describes the requirements for obtaining a domain name for use by external parties?
    10·1 answer
  • Why does python code generate fewer types of syntax errors than code in other programming languages?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!