Find the answer to your Linux question:
Results 1 to 2 of 2
Hi guys, I am new to this unix/linux stuff and I really need help on my assignment. I am stuck on number 9-28. I don't need it to be solved, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013

    PuTTy // Need help on assignment.

    Hi guys, I am new to this unix/linux stuff and I really need help on my assignment. I am stuck on number 9-28. I don't need it to be solved, I just need to know how to find the location of the ssh utility. Is it "which ssh"?
    And to find related to the ssh utility it's "whereis ssh"?
    Also, for number 11 how are you able to see what's inside the files without using the "cat" to display it?

    I am using PuTTy program on windows 7.

    1 Log in and type script at the prompt. The system will respond with

    Script started, file is typescript

    This means that the system will start “recording” all your input and output into a file named typescript.

    2 Type this command to copy a compressed file archive to your directory.

    cp ~linux199/a2files.tar.bz2 .

    Note that there is a blank and a period at the end of the command; you must type both of them or the command won’t work.

    3 Unpack the file. Hint: see pages 62-65, especially the “optional” box on page 65. Pay close attention to the last paragraphs of that box and adapt the commands to do this item. Read more about the tar command.

    4 Display the contents of file announce.txt (hint: page 4. This file contains part of Linus Torvalds’s announcement of the first version of Linux.

    5 Copy file announce.txt to file announce2.txt.

    6 Use the interactive option when copying file states to file announce2.txt; respond n when asked if you want to overwrite announce2.txt

    7 Display the contents of file announce2.txt.

    8 Display the contents of file dijkstra.txt one screen at a time.

    9 Find the location of the ssh utility.

    10 Find the location of files related to the ssh utility.

    11 List the users currently on the system.

    12 Find out what kind of data file mystery contains; do not use the command you used in step 7! Type your answer here: The mystery file is a file.

    13 Find out what the differences are between files and

    How many lines appear in but NOT in

    How many lines appear in but NOT in

    14 Remove file remove_me.txt.

    15 Display the last five lines of the states file.

    16 Sort the states file; the output will display on the screen– the original file will remain untouched.

    17 Display only the last five lines of the result of sorting the states file. Hint: Pipe the output of sort to tail; see page 56 for pipes, page 53 for tail.

    18 The file stein contains a famous quote from Gertrude Stein, one word per line. Sort this file and don’t show any repeated words.

    19 Use grep to find out how many times the word “there” appears in file stein. Your answer: time(s).

    20 Display the file poem, skipping adjacent duplicate lines.

    21 Find out how big file announce.txt is by typing ls -l announce.txt; the number just before the date is the file size in bytes. Note: that is a letter ell after the dash, not a number one. It stands for “long format” listing. File size is:

    22 Compress file announce.txt using the gzip utility.
    What is the name of the resulting compressed file?

    23 Compress file announce2.txt using the bzip2 utility.

    24 Use ls -l (that’s an ell, not a digit one) on the files you created in the previous two steps. Which one is larger?

    25 Without changing the bzipped file from two steps ago, list its contents.

    26 Display the current date in the form (hint: pages 655-657; see especially the example at the end of page 657 and the first paragraph on page 656. Note that there is no leading zero before the day of the month.

    September 4, 2011

    27 Type exit at the command line to save the script file you started in step 1. The system will respond with:

    Script done, file is typescript

    28 Rename file typescript to a2script (hint: page 50).

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Saint Paul, MN
    We do not answer homework assignments on this forum. This has a strong smell of being a homework assignment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts