Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Switch to a command - line terminal ( tty 5 ) by pressing Ctrl + Alt + F 5 , and then log in to

Switch to a command-line terminal (tty5) by pressing Ctrl+Alt+F5, and then log in to the terminal using the user name of root and the password of LINUXrocks!.
2
At the command prompt, type cat /etc/hosts and press Enter to view the contents of the file hosts, which reside in the directory /etc. Next, type cat n /etc/hosts and press Enter. How many lines does the file have? At the command prompt, type tac /etc/hosts and press Enter to view the same file in reverse order.
3
To see the contents of the same file in octal format instead of ASCII text, type od /etc/hosts at the command prompt and press Enter.
4
At the command prompt, type cat /etc/services and press Enter.
5
At the command prompt, type head /etc/services and press Enter. How many lines are displayed, and why?
6
At the command prompt, type head -5/etc/services and press Enter. How many lines are displayed and why? Next, type head -3/etc/services and press Enter. How many lines are displayed and why?
7
At the command prompt, type tail /etc/services and press Enter. What is displayed on the screen? How many lines are displayed and why?
8
At the command prompt, type tail -5/etc/services and press Enter. How many lines are displayed and why? Type the cat n /etc/services command at a command prompt and press Enter to justify your answer.
9
At the command prompt, type file /bin/nice and press Enter. What type of file is it? Should you use a text tool command on this file?
10
At the command prompt, type strings /bin/nice and press Enter. Notice that you can see some text within this binary file. Next, type strings /bin/nice | less to view the same content page-by-page. When finished, press q to quit the less command.
11
Type exit and press Enter to log out of your shell.

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

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions