Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PART 4 : Learn about commands used to view the contents of files. Use the cat command to review the contents of the ~ /

PART 4: Learn about commands used to view the contents of files.
Use the cat command to review the contents of the ~/test2/passwd.bak
Take a screenshot (filename: screenshot_4) of the above activity.
Clear the shell with the clear command.
Resize your terminal window to make it half of the height that it was before by dragging the bottom of the window up.
Now try step 1 again, but use the less command instead of cat. (Use the up and down arrow keys to scroll through the file, type in q, to exit less.)
Return your terminal window to its previous height by dragging the bottom of the window down.
Now try step 1 again, but use the head command instead of cat.
Now try step 1 again, but use the tail command instead of cat.
Try steps 7 and 8 again, but add the -n2 option/flag to the head and tail commands and see what happens.
Type cat > file1 and enter a single sentence about how you feel about Linux. Hit Enter and then type CTRL + d to exit.
Type cat file1 to view its contents.
Create another file with this command ls -la ~ > file50
Append to the end of file50 the contents of ~/test2/passwd.bak using this command cat ~/test2/passwd.bak >> file50
Review the final contents of file50 your work using the less command. You should remember how to exit less.
Search file50 for any lines with the word root by using this command: grep root file50
Take a screenshot (filename: screenshot_5) of the above activities.
Clear the shell with the clear command.

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

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions

Question

1. Identify three approaches to culture.

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago