Linux Discovery Exercise -1

798 Words Sep 15th, 2015 4 Pages
Chapter 1

1. Use the whatis command to determine the purpose of the ls command.
Command: whatis ls
Explanation: ls displays the content of a directory

2. Use the man program to find out what the -R option does when used with the date command. output date and time in RFC 2822 format. Example: Mon, 07 Aug 2006 12:34:56 -0600
3. Use the man program to determine what other commands you should also see in relation to the clear command tput(1), terminfo(5)

This describes ncurses version 5.7 (patch 20100109).

4. Use the cal command to determine on what day of the week you were born. cal [[day] month] year]

5. Use the cal command to determine which year between 2005 and 2010 is a leap year.
…show more content…
man who > who_info less who_info tail -12 who_info head -12 who_info
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. cat> food fish putin sheperd pie
^C
Cat >>food
Chiken wings
Hamburger
^C

15. View the documentation for who and then view the documentation for w. How are these commands similar?. who - show who is logged on w - Show who is logged on and what they are doing.
16. Run the who -uH and w commands using one command-line sequence to compare the results. who -H
NAME LINE TIME COMMENT student :0 2015-09-16 13:16 (console) student pts/2 2015-09-16 13:17 student pts/3 2015-09-16 13:18
---------
student@linux-6c76:~> who -u student :0 2015-09-16 13:16 ? 2696 (console) student pts/2 2015-09-16 13:17 00:17

More about Linux Discovery Exercise -1

Open Document