What command could you use to list the files in your fileAsst directory, using an absolute path to the fileAsst directory as part of your command? What command could you use to list the text files (only) in your fileAsst directory, using a relative path to the fileAsstdirectory as part of your command? The /usr/include directory contains a large number of C/C++ header files (all ending with a .h extension). What command would you give to list the names of the header files in that directory that include the string “re” as part of the name? One of the files you should now have in your fileAsst directory is Empire/darth.txt. Suppose that you wished to copy that file into your current (commandsAsst) directory. What command would you give to make that copy?

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter6: Sub And Function Procedures
Section: Chapter Questions
Problem 3MQ2
icon
Related questions
Question

Please help me by suggesting the steps I should take

 

For this assignment, you will need two sessions open (e.g., a pair of ssh sessions, or a pair of xterms), one for answering the questions, and one for experimenting with different commands to see if they represent the correct answer. When you are satisfied with one of your commands, copy and paste it from your “experimental” window into your “question and answer” window.

  • In either window, create a directory ~/UnixCourse/commandsAsst.

  • Use cd to make that new commandsAsst directory your current working directory (in both of your session windows). For the remainder of the assignment, you should not cd into a different directory.

  • In one window, give the command

    ~cs252/bin/basicCommandsAsst

    to start the assignment.

    This will place some files into the fileAsst directory from the prior assignment. Some of these will be text files (recognizable as such because their names end with “.txt”) and some are data files (named ending in “.dat”). Of course, your fileAsstdirectory also contains two other files, the Empire and `Alliance`` directories that you created in the earlier assignment.

    It will then start prompting you for answers to the questions listed below on this page.

  • In each of the numbered questions below, you are asked for a single Unix command to achieve some goal. You will be typing that command into the assignment checker, just as you would type it into a shell to actually execute the command.

EMPHASIS ON:

Open a pair of windows, connected via ssh to one of the CS Dept Linux servers. Use one to supply answers to the questions listed below, but try your answers out first in the other window.

If you enter a command that is incorrect, the grading script may attempt to offer a hint or two as to what you are doing wrong. These hints are often helpful, but can sometimes be irrelevant, particularly if you happen to come up with an approach to the problem that I had not anticipated. The hints are also likely to be unhelpful if you are so far off the mark that a simple hint cannot possibly suffice, but, in cases like that, you should have seen when you tried the command out in the other window that it wasn’t working.

In many cases you will likely get better information by simply looking closely at the output you got when trying out the command in the other window.

  1. What command could you use to list the files in your fileAsst directory, using an absolute path to the fileAsst directory as part of your command?

  2. What command could you use to list the text files (only) in your fileAsst directory, using a relative path to the fileAsstdirectory as part of your command?

  3. The /usr/include directory contains a large number of C/C++ header files (all ending with a .h extension). What command would you give to list the names of the header files in that directory that include the string “re” as part of the name?

  4. One of the files you should now have in your fileAsst directory is Empire/darth.txt. Suppose that you wished to copy that file into your current (commandsAsst) directory. What command would you give to make that copy?

    For this, and for the following questions,

    • You will want to delete all files already in your commandsAsst directory before trying to check your answer to this question. Otherwise you will not be able to easily tell what files were added by your command and what were left over from earlier attempts.
    • For the same reason, when you submit your suggested answer to the grading script, it will delete any files in your commandsAsst directory before trying out your command.
  5. Suppose that you wished to copy all of the text files from your fileAsst directory into your current directory (without typing out the name of each individual file). What command would you give to make that copy?

  6. Suppose that you wished to copy all of the text files from your fileAsst directory and all of the files from your fileAsst/Empire directory into your current directory (without typing out the name of each individual file). What command would you give to make that copy?

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 6 steps with 7 images

Blurred answer
Knowledge Booster
Lock objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage