CA263Home Work-1Dated: Feb 25, 2008

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 datecommand.

3. Use the man program to determine what other commands you should also see inrelation 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 year between 2005 and 2010 is a leapyear.

6. Clear the screen, and view the online manual to determine how to display today’sdate 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, butoutput that information to a file called users_info. Next view the file you created.

11. View the files, month, and users_info, in sequence using only one command-linesequence 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 whocommand. Next, use the less command to view the who_info file contents, and scrollforward and backward through the information.Then use the tail command to viewthe final 12 lines of the who_info file. Finally, use the head command to view thefirst 12 lines of the who_info file.

14. Create a file called favorite_foods, and list your favorite foods, entering five or six ormore. Press Enter after each favorite food so it appears on its own line (make certainyou also press Enter after the final food item). After the file is created, add two morefoods you like that are not on the list (press Enter after the final food item).View thelist 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 arethese commands similar?

16. Run the who -uH and w commands using one command-line sequence to comparethe 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 commandsyou entered.

19. Run the who -H, cal 2008, and clear commands using one command-line sequence.What doyou end up with on the screen?

20. Use the history function to retrieve the command line you used in Exercise 19. Usethe edit function to remove the word “clear” and replace it with “date.” Next, go tothe 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 iswho -u ; date -u. Execute the command-line entries.