Lab 4

docx

School

San Antonio College *

*We aren’t endorsed by this school

Course

2325

Subject

Information Systems

Date

Apr 3, 2024

Type

docx

Pages

2

Uploaded by BaronRiver11822

Report
Page | 1 of 2 Lab 4 – task 1 Describe two ways to show line 5 from the /etc/passwd file. (#1: Found in Working with Other Useful Text Processing Utilities section) (#2: Found in Displaying the First or Last Lines of a File with head and tail section) 1. Use the sed command by typing sed -n 5p /etc/passwd Figure 1:sed -n 5p /etc/passwd command output 2. Use the head and tail commands by typing head -n 5 /etc/passwd | tail -n 1 Figure 2: head -n 5 /etc/passwd | tail -n 1command output Lab 4 – task 2 How would you locate all text files on your server that contain the current IP address? Do you need a regular expression to do this? Lab 4 – task 3 You have just used the sed command that replaces all occurrences of the text Administrator with root. Your Windows administrators do not like that very much. How do you revert? Lab 4 – task 4 Assuming that in the ps aux command the fifth line contains information about memory utilization, how would you process the output of that command to show the process that has the heaviest memory utilization first in the results list? Lab 4 – task 5 Which command enables you to filter the sixth column of ps aux output?
Page | 2 of 2 Lab 4 – task 6 How do you delete the sixth line from the file ~/myfile?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help