Question

In: Computer Science

Use CYGWIN TERMINAL to create this script. COPY AND PASTE the screenshot. Script 1: 1.   Perform...

Use CYGWIN TERMINAL to create this script. COPY AND PASTE the screenshot.
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".

Solutions

Expert Solution

1. ~ means home directory and ls will list all the files.-al are attributes f ls comman and they mean
a --> list all the hidden file types
l --> to prit he long version ersion of the files (in detail)
We use output edirection symbol (>) to save the o/p to new file.
So the command would be

ls -al > ls.dat

2.Tree command will print the list of irectories in the given path.It has many attributes like -a-->print hidden files,-d-->print directories only etc
command:
tree ./home
to save this output use the redirection opertor,i.e >
So command willbe

tree ./home > tree.dat

3.To create new directory command used is "mkdir"
Command will be
mkdir backups

4&5
inorder to move to files to current directory we use 'mv' command and to refer to current directory we use "./".
For renaming the file we can use the same mv command where we expliciy give the target filename (which is the new name)

4.command will be as below
mv ls.dat ./backups

mv tree.dat ./backups

5. navigate to backups folder and give ls command to view the renamed files
mv ls.dat ./backups/ls.bu

mv tree.dat ./backups/tree.bu

All the commands in sequential order for the above questions.


Related Solutions

Directly copy the source code and paste into the Word file. Screenshot of running result must...
Directly copy the source code and paste into the Word file. Screenshot of running result must be presented. 1. (20 points) Write the “Hello, world!” program. 2. (30 points) Write a program to calculate the sum from -5 to10. Use the for loop to do the calculation. 3. (20 points) Write a complete C++ program that asks the user to enter the necessary information about the cylinder, calculate the volume in a function (named as calculate_vol, using reference to pass...
Create (script and perform) an innovation pitch for the Lipton Tea Company
Create (script and perform) an innovation pitch for the Lipton Tea Company
1. Don't use handwriting. 2. Don't copy and paste (((use your own words.)))) Q1:What is the...
1. Don't use handwriting. 2. Don't copy and paste (((use your own words.)))) Q1:What is the difference between a population and a sample in statistics? (in details) (((use your own words.)))) Q2. How to interpret confidence intervals and confidence levels?(in details) (((use your own words.)))) Q3. Why the p-value is important?(in details) (((use your own words.))))
4. Create a new project AccountPolymorphism and copy and paste the code from the attached AccountPolymorphism.cpp...
4. Create a new project AccountPolymorphism and copy and paste the code from the attached AccountPolymorphism.cpp file. Compile and run. You will see that it is not showing output for Base class pointer to base class object data, not showing derived class output completely(missing word "Saving" in the output) and not showing any output for Base class pointer to derived class object(Saving). Fix these issue and submit the output. // AccountPolymorphism.cpp : This file contains the 'main' function. Program execution...
DO NOT PLAGIARIZE, use outside sources, copy and paste, use other solutions that are on here....
DO NOT PLAGIARIZE, use outside sources, copy and paste, use other solutions that are on here. Please use your own words. How do you use the scientific method in your everyday life. At first this may seem strange, since you don't think that you use the scientific method at all. But by understanding the terms (like hypothesis, prediction, experiment, variables, controls, data gathering, and analysis), you should be able to relate them to something that you do. For example, some...
Task: 2.1 : Shell Scripting Task1 :Traditional hello world script Open terminal create Lab01 directory and...
Task: 2.1 : Shell Scripting Task1 :Traditional hello world script Open terminal create Lab01 directory and use cd command to move into the directory Open a new file script hello.sh using vi editor # vi hello.sh Type the following lines #!/bin/bash           echo Hello World     Save the file and return back to terminal How to Runhello.sh Adding Execute Permission Checking current permission        # ls -la hello.sh Adding Execute permission # chmod u+x hello.sh   Check whether execute permission is added # ls...
Here is the name of the article you need to use, you can copy and paste...
Here is the name of the article you need to use, you can copy and paste it and it will come right away: They Said Seattle’s Higher Base Pay Would Hurt Workers. Why Did They Flip? 1) Briefly summarize the main points of the article 2) Who benefitted from the minimum wage increase? Who was made worse off? 3)Explain how the researchers reconciled their old results with their new results. 4) How convinced are you that the researchers isolated the...
1. Don't use handwriting,please. 2. Don't copy and paste use your own words. 3. I need...
1. Don't use handwriting,please. 2. Don't copy and paste use your own words. 3. I need Reference link . (important) Q1:What is the difference between a population and a sample in statistics? (in details) Q2. How to interpret confidence intervals and confidence levels?(in details) Q3. Why the p-value is important?(in details)
Run the following R code (copy and paste) to create some data: out1 <- rep( c(0,0,1),...
Run the following R code (copy and paste) to create some data: out1 <- rep( c(0,0,1), 3 ) out2 <- rep( c(1,0,1), 3 ) counts <- c(18,17,15,20,10,20,25,13,12) This is a variation on the data in the first example on the “glm” help page in R. The counts variable is our response variable and will be modeled as a Poisson variable, the out1 predictor variable will measure the difference between outcomes 2 (baseline) and 3, and out2 will measure the difference...
Discussion GIARISM IS NOT ALLOWED, USE YOUR WORDS DON’T COPY AND PASTE. *(Pleas make it as...
Discussion GIARISM IS NOT ALLOWED, USE YOUR WORDS DON’T COPY AND PASTE. *(Pleas make it as a text not handwriting) if there any reference add it During the Covid-19 pandemic and based on its natural a great deal of businesses has been impacted by it. Also, due to its rapid outbreak working from home and the limitation of travel become vital and critical to limit the spread of Covid-19 as well as the safety of the people. Thus, digital transformation...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT