Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Three linux problems Below is a two-column report showing the number (first column) of each different group-id (second column) from the /etc/passwd file. Use a

Three linux problems

Below is a two-column report showing the number (first column) of each different group-id (second column) from the /etc/passwd file. Use a pipe of cut/sort/uniq to re-create this output. Some man page perusing may be required!

$

 5 0 1 1 1 2 1 4 1 7 1 12 1 13 1 14 1 16 1 23 1 27 1 28 1 29 1 30 1 32 1 37 1 38 1 42 1 43 1 47 1 48 1 50 1 51 1 67 1 68 1 69 1 70 1 74 1 77 1 81 1 86 1 94 1 97 1 99 2 100 74 411 2 412 1860 511 . . . 

From your home directory, use egrep/cut/sort to produce a list showing the username and real name of all the students in the /etc/passwd file; the list should be lexicographically sorted by username. Copy/paste just your command for hand-in.

023906973:Hobs Ryan Tomas 10608634:Yang Zhi 11159827:Chan Jonas . . . zrkerk:"Kerk Zi Rui" . zsj25502:Zeng Jero 

3.

egrep -i "^(.*:){4} ?v.*:/home.*$" /etc/passwd 

Rewrite it to make it as UN-complex as possible while still working! Hint: The solution uses just 3 characters with special meaning whereas the above solution uses ~13 (depending on how you count them!)

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

2nd Edition

1597499471, 978-1597499477

More Books

Students also viewed these Databases questions

Question

4. Describe what it means to have multiple goals.

Answered: 1 week ago

Question

2. Do you find change a. invigorating? b. stressful? _______

Answered: 1 week ago

Question

How was their resistance overcome?

Answered: 1 week ago