QuestionQ172

VerifiedEssential Commands

Which command will create an archive file named backup.tar that contains all the files from the /home directory?

Explanation

The tar utility uses the -c flag to create a new archive and the -f flag to specify the archive's filename, followed by the directory or files to be archived. The correct command structure is tar -cf <archive_name> <source_directory>, so tar -cf backup.tar /home creates an archive named backup.tar containing the contents of the /home directory. Commands using -x perform extraction rather than creation, and reversing the order of the archive name and source directory would not produce the desired result.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!