asked 65.7k views
1 vote
You have arranged some directories and files as follows:

/home/yourLoginName/
docs/
a.txt
b.txt
assts/
cs150/
a0.cpp
cs250/
adata
a1.h
a1.cpp
a2.h
a2.cpp
You have just issued the command:
cd ~/assts/cs150
Which of the following are valid ways to copy all of the header files from the cs250 directory into the cs150 directory?
a) cp ../cs250/* ../cs150
b) cp ../cs250 cs150
c) cp ../cs250/*.? .
d) cp ../cs250/*.* cs150
e) cp ../cs250/*.h cs150
f) cp ../cs250/*.h .

asked
User Cone
by
8.6k points

1 Answer

4 votes

Answer:

The answer is "Option a and Option f"

Step-by-step explanation:

In the given question option a and option f is correct because both commands use the "cp" command, which is used to copy files and in this command, in option a, it uses the file "from cs250 to cs150", and an option "f" uses the "cs250 with '.h' that is a file extension", and the wrong choice can be defined as follows:

  • In choice b, it is wrong because it is not a correct command.
  • In choice c, in this command we use "?" symbol, that is wrong.
  • In choice d and e both were invalid.
answered
User Liorix
by
7.5k points