1.

What does -i option do?(a) interactive copying(b) recursively copying(c) updating(d) none of the mentionedI got this question in semester exam.My question comes from Copying a File: cp Command in chapter Handling Ordinary Files of Unix

Answer» RIGHT option is (a) interactive copying

The explanation is: (-i) option is used for interactive copying. It means that suppose if we invoke a command like cp file1file2 and if file2 already EXISTS then it will be overwritten which can be a nightmare for many USERS. To AVOID this, we use -i option. It provides us with a warning before OVERWRITING a file. It asks the user whether to overwrite the file or not. The syntax is cp-i source_filedest_file.


Discussion

No Comment Found

Related InterviewSolutions