Questions: Question 18 1 pts You have a subdirectory called source under your home directory and want to copy the programs, proga and progb, to the source directory. Which of the following commands enables you to do this? mv source proga progb paste /source proga progb copy proga progb to source cp proga progb source

Question 18
1 pts

You have a subdirectory called source under your home directory and want to copy the programs, proga and progb, to the source directory. Which of the following commands enables you to do this?
mv source proga progb
paste /source proga progb
copy proga progb to source
cp proga progb source
Transcript text: Question 18 1 pts You have a subdirectory called source under your home directory and want to copy the programs, proga and progb, to the source directory. Which of the following commands enables you to do this? mv source proga progb paste /source proga progb copy proga progb to source cp proga progb source
failed

Solution

failed
failed

The answer is the fourth one: cp proga progb source.

Explanation for each option:

  1. mv source proga progb: This command attempts to move the directory source and the files proga and progb to a new location, which is not specified here. It does not copy the files to the source directory.

  2. paste /source proga progb: The paste command is used to merge lines of files, not to copy files. Additionally, /source refers to an absolute path, not the source directory under your home directory.

  3. copy proga progb to source: This command is not valid in Unix/Linux systems. The copy command is used in some other operating systems like Windows, but not in Unix/Linux.

  4. cp proga progb source: This is the correct command. The cp command is used in Unix/Linux to copy files. Here, it copies proga and progb into the source directory.

In summary, the correct command to copy the files proga and progb to the source directory is cp proga progb source.

Was this solution helpful?
failed
Unhelpful
failed
Helpful