Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DISCOVERY EXERCISES 1 . Use the whatis command to determine the purpose of the ls command. 2 . Use the man program to find out

DISCOVERY EXERCISES
1. Use the whatis command to determine the purpose of the ls command.
2. Use the man program to find out what the -R option does when used with the date
command.
3. Use the man program to determine what other commands you should also see in
relation to the clear command.
4. Use the cal command to determine on what day of the week you were born.
5. Use the cal command to determine which years between 2006 and 2015 are leap years.
6. Clear the screen, and view the online manual to determine how to display todays
date in UTC.
7. Display the current UTC.
8. Create a file called month containing the current month.
9. View the contents of the month file you created in Exercise 8.
10. Use the who command to determine the idle time for users currently logged in, but
output that information to a file called users_info. Next, view the file you created.
Figure 1-20 Viewing the contents of the notes file
Discovery Exercises 51
1
11. View the files, month and users_info, in sequence using only one command-line
sequence of commands.
12. View the files month and users_info in sequence by using:
The less command
The more command
13. Create a file called who_info that contains the documentation for the who
command. Next, use the less command to view the who_info file contents, and scroll
forward and backward through the information. Then use the tail command to view
the final 12 lines of the who_info file. Finally, use the head command to view the
first 12 lines of the who_info file.
14. Create a file called favorite_foods, and list your favorite foods, entering five or six or
more. Press Enter after each favorite food so it appears on its own line (make certain you
also press Enter after the final food item). After the file is created, add two more foods
you like that are not on the list (press Enter after the final food item). View the list of
foods to make certain the two items you added appear at the end of the list.
15. View the documentation for who, and then view the documentation for w. How are
these commands similar?
16. Run the who -uH and w commands using one command-line sequence to compare
the results.
17. Determine when the computer on which you are working was last booted.
18. Use the command-line history function to determine the most recent two commands you entered.
19. Run the who -H, cal 2009, and clear commands using one command-line sequence.
What do you end up with on the screen?
20. Use the history function to retrieve the command line you used in Exercise 19. Use
the edit function to remove the word clear and replace it with date. Next, go to
the beginning of cal and delete the text on the line from cal to the end. Now,
change the -H to -u. Finally, add date -u so that your final command-line entry is
who -u ; date -u. Execute the command-line entries.

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions