nerdexam
CompTIA

XK0-005 · Question #95

A Linux administrator needs to back up the folder /usr/domain, and the output must be a gzip compressed tar. Which of the following commands should be used?

The correct answer is C. tar -czvf domain.tar.gz /usr/domain. https://help.ubuntu.com/community/BackupYourSystem/TAR The key is passing the -z for compression. then the name of the compress file, then the path of what you want compressed. tar - is the command that creates the archive. It is modified by each letter immediately following…

System Management

Question

A Linux administrator needs to back up the folder /usr/domain, and the output must be a gzip compressed tar. Which of the following commands should be used?

Options

  • Atar -cv domain.tar.gz /usr/domain
  • Btar -cvf /usr/domain domain.tar.gz
  • Ctar -czvf domain.tar.gz /usr/domain
  • Dtar -cxzv /usr/domain domain.tar.gz

How the community answered

(28 responses)
  • A
    7% (2)
  • B
    18% (5)
  • C
    71% (20)
  • D
    4% (1)

Explanation

https://help.ubuntu.com/community/BackupYourSystem/TAR The key is passing the -z for compression. then the name of the compress file, then the path of what you want compressed. tar - is the command that creates the archive. It is modified by each letter immediately following, each is explained bellow. c - create a new backup archive. v - verbose mode, tar will print what it's doing to the screen. p - preserves the permissions of the files put in the archive for restoration later. z - compress the backup file with 'gzip' to make it smaller. f <filename> - specifies where to store the backup, backup.tar.gz is the filename used in this example. It will be stored in the current working directory, the one you set when you used the cd

Topics

#tar command#File archiving#Gzip compression#Backup procedures

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice