Uploaded by gpapotto1

PracticeTest

advertisement
Log into Suse Linux
Switch to the user student. Enter the command: whoami. If you have correctly changed to the user
student enter the command cd.
IMPORTANT: To “get recent” history added to the .bash_history file enter the following command:
export PROMPT_COMMAND=’history -a’
Create a group with your program emphasis: programming or networking. Use one of the following:
groupadd programmers
or
groupadd
1. Complete the steps on page 39 (practice using the man utility) from the Tracy book. Begin on
step 4. Answer the following questions.
Skip the bullet/question “In what man section does the cpt page reside?
Type your responses here (in order)
1Kobe
2
3
4
6
2. Complete the steps on page 41 (practice using the info utility) from the Tracy book. Begin on
step 4. Answer the following questions.
1
2
3
4
5
6
7
3. Use the cat command to create a file named eats.txt. The file list your favorite 7 places to dine.
Use the clear command.
Display the file eats.txt you created.
4. Use the cat command to create a file named favFoods.txt. The file list 7 of your favorite foods.
,
5. Paste the favFoods.txt to your eats.txt file.txt file. Use the as a delimiter.
(Example output:
Applebees,Spaghetti
Arbys,Eggplant Parmagian
What did you enter at the command prompt in Task 5?
Paste –d, eats.txt favfoods.txt
6. Display the first five lines of the file favFoods. What did you enter at the command prompt?
Head -5 favfoods.txt
7. Use the translate command to change the file eats.txt to all uppercase. What did you enter at
the command prompt?
Tr ‘a-z’ ‘A-Z’ < eats.txt cat favfoods.txt |tr ‘a-z’ ‘A-Z’
8. How many lines are there in the eats.txt file? What did you enter at the command prompt to
get the information displayed
Wc,7
9. Enter the command again you that you used for Task 5 – add the following at the end:
> dining.txt to the end:
(paste –d, eats.txt favFoods.txt > dining.txt)
10. Display the last 10 lines of the /etc/passwd file. What did you enter at the command prompt?
tail
11. Use the cut command to extract the second field of dinning.txt file .
12. Create a file with the following content:
Download