InterviewSolution
Saved Bookmarks
| 1. |
What happens if the destination file specified in cp command does not exist?(a) file will not be copied(b) an error will be produced(c) destination file will be automatically created(d) none of the mentionedThis question was posed to me in quiz.This is a very interesting question from Copying a File: cp Command in chapter Handling Ordinary Files of Unix |
|
Answer» RIGHT choice is (c) destination FILE will be automatically created For explanation: If the destination file does not exist, then cp command will automatically create a file with the same NAME and then it copies the contents of the source file to the file which is created.If the destination file already EXISTS, then it will be overwritten with the contents of the source file. |
|