Question
1. Enter the command necessary to navigate to your home directory. 3. Use the mkdir command to create a directory named HW1 in your home
1. Enter the command necessary to navigate to your home directory.
3. Use the mkdir command to create a directory named HW1 in your home directory. Navigate into the newly created directory HW1.
4. Enter the command that will determine whether or not echo is an internal or external command. Redirect the standard output to a file named question4.txt.
5. Enter the command to display your current working directory and redirect the standard output to a file named question5.txt
6. Using the touch command, create the following files within the HW1 directory:
color.txt
first.txt
last.txt
number.txt
7. Using the nano editor, add the following words one per line to the color.txt file:
yellow
brown
black
blue
green
red
pink
orange
white
gray
8. Using a text editor, add the following words one per line, to the first.txt file:
matt
brian
james
ben
josh
Katie
luke
mark
john
blake
9. Using a text editor, add the following words one per line, to the last.txt file:
smith
harrison
lieb
johnson
connon
connon
willis
willis
willis
placer
mulder
crowder
anderson
10. Using a text editor, add the following numbers one per line, to the numbers.txt file:
333-4444
777-8888
666-7777
111-2222
888-9999
111-0000
222-1111
444-5555
222-3333
555-6666
11. Enter a single command that will display the contents of the last.txt, full.txt and numbers.txt files.
12. Enter the command that will merge the following three files together: last.txt, first.txt and numbers.txt so that there are three columns. Redirect the standard output to a new file names phonelist.txt.
Example: anderson josh 555-666
smith matt 333-4444
13. Use the cat command to view the contents of the phonelist.txt file. What is wrong with the content created in this new file?
14. Enter the command that will clean up the redundant line within the last.txt file. Redirect the output to a new file named last.new.txt. *hint (Chapter 1 lists the command to remove duplicate lines).
15. Enter the command to merge the following files: last.new.txt, first.txt, numbers.txt with line numbers. Redirect the output to a new file called, phonelist.final.txt
16. Using the following commands, extract the IP address from the eth0 interface and redirect the output to a file named, ip_address.txt.
ifconfig (/sbin/ifconfig)
grep
cut
17. Combine all four files (color.txt; last.new.txt; first.txt; and number.txt with the following requirements:
The list must be sorted in a reverse alphabetical order
The list must be numbered
Redirect the output to a new file named question17.txt
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started