The next couple questions deal with the file “last_log”. Take a look at it if yo
ID: 3801842 • Letter: T
Question
The next couple questions deal with the file “last_log”. Take a look at it if you like, it is just the output of a command called “last”. It is in that same directory as before, and you can use it there or copy it if you like.
24. I have seen some suspicious activity from IP addresses that start with 68.99. In the file they will be listed as “68-99-” or as “ip68-99-” and they may have “.om” on the end. (These are Cox users in Omaha. For the correct answer you will need to figure out how to eliminate the extra junk and just use the IP address.) I want you to create one command that will give me a sorted list of these suspicious users in the following format:
adammuno 68-99-4-45
ajgehrin 68-99-5-15
(snip – many are cut out)
wmahoney 68-99-3-88
zfaulkne 68-99-28-102
Cool, eh? You may need to use – I know because I had to figure it out – the combination of “grep”, “sed” (with multiple –e options), “awk”, “sort”, and “uniq”. The correct output should have 32 people that match. What did you come up with?
rfulkers ptsl 1696 mosh 15047] Mon Oct 24 10:01 still logged in rfulkers pts/1700 mosh [16649] Mon Oct 24 10:01 still logged in coltwest pts/1714 fpld-47.crisslib Mon Oct 24 09:59 still logged in adorcy pts/1538 10.12.0.37 Mon Oct 24 09:55 still logged in bross pts/1727 98.23.163.11 via Mon Oct 24 09:46 still logged in bross pts/1727 mosh [18333] Mon Oct 24 09:46 09:46 (00:00) bross ptsl1727 98.23.163.11 via Mon Oct 24 09:46 09:46 (00:00) asusman pts/1706 phi-dev.ist.unom Mon Oct 24 09:46 still logged bross pts/1727 mosh [18333] Mon Oct 24 09:41 09:46 (00:04) twjorgen pts/1758 74.51.217.170 Mon Oct 24 09:39 09:46 (00:06) sshupe pts/1 753 137.48.185.89 Mon Oct 24 09:39 10:01 (00:22) eshafer ptst1752 p 174-74-1-73.om Mon Oct 24 09:38 still logged in youn pts/1585 137.48.185.125 Mon Oct 24 09:38 still logged in mrbacon pts/1750 10.12.5.87 Mon Oct 24 09:34 still logged in wmahoney pts/1749 p68-99-3-88 om. Mon Oct 24 09:32 still logged sriramsr ptsl1746 137.48.186.209 Mon Oct 24 09:31 still logged in osaha ptst1735 10.8.58.76 Mon Oct 24 09:30 still logged in inekl ptsl1723 10.8.9.161 Mon Oct 24 09:30 09:49 (00:19) rfulkers pts/1700 68.13.53.101 via Mon Oct 24 09:26 10:01 (00:35) rfulkers pts/1 700 mosh [16649] Mon Oct 24 09:26 09:26 (00:00) rfulkers pts/1700 68.13.53.101 via Mon Oct 24 09:26 09:26 (00:00) rfulkers ptsl 1696 68.13.53.101 via Mon Oct24 09:26 10:01 (00:35) rfulkers pts/1 696 mosh [15047] Mon Oct 24 09:26 09:26 (00:00) rfulkers ptsl 1696 68.13.53.101 via Mon Oct24 09:26 09:26 (00:00) rfulkers pts/1 696 mosh [15047] Mon Oct 24 09:26 09:26 (00:00) rfulkers pts/1 700 mosh [16649] Mon Oct 24 09:26 09:26 (00:00) bhan drew pts/1709 10.8.17.40 Mon Oct 24 09:24 still logged in rfulkers pts/1696 68.13.53.101 via Mon Oct 24 09:21 09:26 (00:04) rfulkers ptsl 1700 68.13.53.101 via Mon Oct24 09:21 09:26 (00:04) rfulkers pts/1 696 mosh [15047] Mon Oct 24 09:21 09:21 (00:00) rfulkers pts/1 700 mosh [16649] Mon Oct 24 09:21 09:21 (00:00) rfulkers ptsl 1700 68.13.53.101 via Mon Oct24 09:21 09:21 (00:00) rfulkers ptsl 1696 68.13.53.101 via Mon Oct 24 09:21 09:21 (00:00)Explanation / Answer
Super user command to display the list of IP address with the specified range.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.