CIS 210 Homework Assignment #8

Due: Wednesday, Apr 23, 2008 by 3PM

Name:
Email:

NOTE: To copy and paste in the Unix environment the following may be used:
  1. Enter below the command you would use to capture the output of a chronological long listing of your home directory contents into a file name "homelist.txt". (Using redirection) (1pt)

  2. Sort the contents of the file /mnt/homes/CLASSES/MET489/lab08/random2.data in reverse alphabetical order. Paste the last 3 lines of the sorted contents below. (1pt)

  3. Sort the contents of the file /mnt/homes/CLASSES/MET489/lab08/random2.data using a numeric sort instead of alphabetical. Paste the last 3 lines of the sorted contents below. (1pt)

  4. Using grep, show any lines that do NOT have the text "VT" in them from the file /mnt/homes/CLASSES/MET489/lab08/vt.stations. Paste the command and results below: (1pt)

  5. Show the last five users who have logged into your workstation (Hint: Use the last command a command pipe). What single command can you use to show just this information? (2pts)

  6. Show the command you would use to have the output from the previous question filter out your username (so your name is not there) from the output (use a pipe). (2pts)

  7. Show the names of all environment variables (see lab 2) that contain the text "NA" and show the command to redirect this output into a file called "env.out" into your unix_class directory . (2pts)

last updated: 21 Apr 2008 18:36