If a user copies a file and the target name already exists the user will overwri
ID: 3531424 • Letter: I
Question
If a user copies a file and the target name already exists the user will overwrite or "clobber" the file and will not receive a warning. To prevent overwriting an existing file when copying, usecp -i(interactive) option as a security measure. The-ioption only prompts the user if they are about to overwrite an existing file and gives the user a choice. Answering "y" will overwrite the file; answering "n" will return the shell prompt without copying. It is a good idea to get into the habit of usingcp -isince this can prevent accidental mistakes.
Command Format:cp -r[-i] source_directory(s) destination_directory
Command Format:mv [i] source_file target-name
Explanation / Answer
f the user's current working directory is the home directory (
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.