Why is the tar command preferred over the cp -r command for creating backup copies of directory hierarchies?

What will be an ideal response?

You can use the tar command to copy one directory to another directory. You can also use the cp -r (or cp -R) command to do so, but the disadvantage of using this command is that the file access permissions and file modification times aren’t preserved. The access permissions of the copied files and directories are determined by the value of umask and the modification time is set to current time. More commonly, the tar command is used to archive the source directory, create the destination directory, and untar (unpack) the archived directory in this latter directory. The entire task can be performed with one command by using command grouping and piping.

Computer Science & Information Technology

You might also like to view...

Which search strategy should you use to search for a specific phrase?

a. Use quotation marks around the phrase b. Use asterisks around the phrase c. Include Boolean operators in the phrase d. Use a wild card around the phrase

Computer Science & Information Technology

In reflection attacks, the ______ address directs all the packets at the desired target and any responses to the intermediary.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology