-3

How to display only the names of the last 10 services listed in /etc/services?

  • 1
    Is this a homework question? – jordanm Mar 21 '19 at 1:17
  • 2
    Seems like assignment/quiz questions :P – Vivek Kanadiya Mar 21 '19 at 2:27
  • As the down-arrow hint says: This question does not show any research effort. – Juan Mar 21 '19 at 10:44
  • The title doesn't make a lot of sense compared with the body; could you clarify what you're after, here? Thank you! – Jeff Schaller Mar 21 '19 at 11:01
1
tail -n 10 /etc/services | cut -f 1 -d " "
|improve this answer|||||
0

Other way:

awk -F' ' 'NF=1' /etc/services |tail -n 10

or

awk -F' ' '{print $1}' /etc/services |tail -n 10

|improve this answer|||||
-2

You can use following command.

ls -ltr | tail
|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.