CIS 2101 Homework Assignment #8

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/CIS2101/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/CIS2101/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/CIS2101/lab08/vt.stations. Paste the command and results below: (1pt)

  5. Show the command you would use to have the output from the previous question automatically go into a file named "vt_no.out". (1pt)

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

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

  8. 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" in your CLASSES directory /mnt/homes/CLASSES/CIS2101/<username> . (2pts)

  9. Show the command to create an alias named rm_all_jpg that would delete all files in the current directory which end in .jpg (2pts)

  10. Create a tar file of all files ending in ".jpg" that you copied in question 8 from last weeks' homework (HW_07). (If your 'CLASSES/unix_lab07' directory is empty, just show the command you would use.) Name this tar file mytarfile.tar. Show the command below and a long listing of the tar file.(2 pt)

last updated: 22 Oct 2012 13:45