Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. What are the benefits of clean installation over upgrading? I 3 Move up one level in the tree by typing cd Notice that your

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
1. What are the benefits of clean installation over upgrading? I 3 Move up one level in the tree by typing cd Notice that your prompt changed to /home$. Perform another directory listing. You should only see one directory because you only have one user (linuxadmin) in your system at this point. 4 Move up one more level by typing cd .. You are now at the root level. All directories on the computer are below this level. Perform a directory listing. How many directories do you see? 5 Now let's move back to where we started. Type cd home to move down into the directory called "home." Perform a directory listing - it should look the same as in step 3 above 6 Move down into the linuxadmin" directory by typing cd linuxadmin Perform a directory listing - it should look the same as in step 2 above. 7 Type pwd Notice your present working directory is /home/linuxadmin 8 Rather than move one step at a time, move from your location all the way up to the root level by typing cd/ 9 Type pwd Notice now that your present working directory is / TUTTO PER OTHER EV HURUCTOU TOCH UTHY SEE ON CUTY dia 10 Perform a directory listing - it should look the same as in step 4. Page 1 .v.1804 Copyright 2020 Ryan Brovold 11 Now return to your starting directory by moving down two levels at once. Type cd Ihome/linuxadmin Perform another directory listing - you are home again. 12 This time, we want to see the directory contents of the root directory, but we are not going to move our location. Type Is / it should look the same as steps 4 and 9 above. However, in steps 4 and 9, you moved to the root directory. This time, you stayed in your home directory. Type pwd to show your current location . TRIOTICO. TEFTANICE UITECTORY OUTICE. TUU OTOM OFTV SCC OC COUTY here to search - 50 1/2 12 This time, we want to see the directory contents of the root directory, but we are not going to move our location. Type Is / it should look the same as steps 4 and 9 above. However, in steps 4 and 9, you moved to the root directory. This time, you stayed in your home directory. Type pwd to show your current location. 13 Now let's see how many games are on your computer. Type is /usr/games In this directory, you should see about five or six items. 14 Let's say you want to perform a directory listing of the /etc directory. You would type is /etc Now however, you don't want the information displayed to a screen you want to save the information as a file. This time, type is /etc > testdir.txt Notice that nothing on the screen displayed the directory listing. However, you created a file. Type Is and you should see a new file called testdir.txt 15 View the contents of the file by typing cat testdir.txt What is displayed to the screen looks like what you would expect when you would type Is However, what you are looking at is the contents of a file that was made by performing an Is command 16 Only view the first ten lines of the file by typing head testdir.txt 16 Only view the first ten lines of the file by typing head testdir.txt 17 Only view the last ten lines of the file by typing tail testdir.txt 18 Make a new directory called "module2" by typing mkdir module2 Confirm this by typing Is and you should see the new directory. You should also be able to see the file called "testdir". 19 You decide to make a copy of the testdir" file and place it inside the new "module2" directory. Complete this by typing cp testdir.txt module2 20 Type is module2 to confirm the file was copied. 21 You decide to rename the copy. Type mv module2/testdir.txt module2/testbackup.txt 22 Type Is module2 to confirm the file was renamed. 23 Now you decide that a better location for the backup file is on your desktop. Move the file from the module2 directory to the Desktop directory by typing my module2/testbackup.txt Desktop/testbackup.txt (watch for the capitalization b Move the file from the module2 directory to the Desktop directory by typing mv module2/testbackup.txt Desktop/testbackup.txt (watch for the capitalization) 24 Type Is module2 to confirm the file no longer exists in this location. Page 2 .v 1804 Copyright 2020 Ryan Brovold 25 Type Is Desktop to confirm the file exists (you can also see the file on your desktop). 26 After all this work, you decide a backup copy isn't needed, so you want to delete the file. Type rm Desktop/testbackup.txt meme. Type rm Desktoprestackup.ixt 27 Good thing you still have the original file. Type Is to see the contents of your home directory and confirm you still have a file called "testdir.txt" 28 Look at the contents of the file again by typing cat testdir.txt 29 There is too much information and the screen fills with so much information, that you can't see the beginning or middle of the file. You decide you want to look at each line, so you want to slow the scrolling speed down. Type cat testdir.txt more The vertical line is called a "pipe" - it is the key above the Enter key. More allows the computer to hold "more" information until you are ready. Hit the Enter key to go down one line at a time. Hit the Spacebar to go down one page at a time. Press the spacebar until you return to your prompt. 30 You want to know if the word "host" appears as text inside the "testdir" file. To do this, type grep host testdir.txt You should only see the five lines where the word "host" exists in the file. The original file is still the same, you are just viewing it differently viewing i umerenuy. 31 The results of your search are displayed to the screen as text. In a sense, when you use grep, it is filtering out the document to only show you the key word you are looking for. You can make this permanent by redirecting this output as well. You decide you want to create a new file that contains the results of your grep serach. Type grep host testdir.txt > grepresults.txt Notice nothing was displayed to the screen. 32 Type is to see that you now have two files: "testdir" and "grepresults" 33 You want to see what is inside the "grepresults" file, so type cat grepresults.txt 34 After looking at the testdir" file you realize that it does not contain enough information. You want more details on the files. Type is -1 letc > testdir2.txt 35 Look at the contents of this file by typing cat testdir2.txt Notice you see permissions, owners, size and timestamps. 36 Sort this file in dictionary order by typing sort -d testdir2.txt Notice the sort order changed. The original file is still the same, you are just viewing it differently 37 Sort the file in reverse order by typing sort -r testdir2.txt 38 Search the file for instances of "host" again by typing grep host testdir2.txt 39 This is very exciting information to keep and treasure forever, so you want to redirect this output to a new file called "grepresults2" by typing grep host testdir2.txt > grepresults2.txt 40 Perform a directory listing by typing Is. You should see four files that you created: "grepresults." "grepresults2" "testdir" and "testdir." 41 You want to make a new tdider called "Lab2" to store these four files. Make the directory by typing mkdir Lab2 42 Now move each file into this directory. Type my grepresults.txt Lab2 to move the first file. Repeat this command to move the other files 43 Type is to confirm the files are no longer present. Type Is Lab2 to confirm they have been moved. W OCCUTTUCCEUTY 44 You realize that you no longer need the directory called "module2" and you want to delete it. Type rmdir module2 Type is to confirm it is deleted. 45 Close all terminal sessions, windowns, and shut the computer down

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

1. Explain the 2nd world war. 2. Who is the father of history?

Answered: 1 week ago