exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 39 discussion

Actual exam question from RedHat's EX200
Question #: 39
Topic #: 1
[All EX200 Questions]

SIMULATION -

Create a backup -
Create a backup file named /root/backup.tar.bz2, contains the content of /usr/local, tar must use bzip2 to compress.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
cd /usr/local
tar ג€"jcvf /root/backup.tar.bz2
mkdir /test
tar ג€"jxvf /root/backup.tar.bz2 ג€"C /test// Decompression to check the content is the same as the /usr/loca after
If the questions require to use gzip to compress. change ג€"j to ג€"z.

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
adolfoale
Highly Voted 2 years, 12 months ago
# tar -cjvf /root/backup.tar.bz2 /usr/local
upvoted 31 times
VforVodoo
5 months ago
file /root/backup.tar.bz2 ##to check file information, it should show "bzip2 compressed data..."
upvoted 1 times
...
gunwantk
2 years, 3 months ago
Simple to understand and execute, [root@station ~]# yum install bzip2 [root@station ~]# tar -cvf /root/backup.tar /usr/local/ [root@station ~]# du -sh /root/backup.tar 20K /root/backup.tar [root@station ~]# bzip2 /root/backup.tar [root@station ~]# du -sh /root/backup.tar.bz2 4.0K /root/backup.tar.bz2 [root@station ~]#
upvoted 4 times
Hmenu0s
1 year, 5 months ago
I don't think this is right answer as the question explicitly asks "tar must use bzip2 to compress". Apart from that the answer provided is perfectly valid.
upvoted 2 times
...
...
lordstans
2 years, 7 months ago
This is the right answer
upvoted 3 times
...
...
hitode
Most Recent 4 months, 1 week ago
#tar -cavf /root/backup.tar.bz2 /usr/local
upvoted 1 times
...
Gustavo_13
1 year, 10 months ago
tar -jcvf /root/backup.tar.bz2 /usr/local
upvoted 2 times
...
Hammer84
2 years, 1 month ago
tar -cjf /root/backup.tar.bz2 /usr/local
upvoted 4 times
brahmimedamine
2 years, 1 month ago
can you explain more please
upvoted 1 times
...
...
Ares23
2 years, 8 months ago
tar -cvf /root/backup.tar /usr/local && bzip2 /root/backup.tar
upvoted 3 times
...
ms200
2 years, 11 months ago
# tar -cjvf /root/backup.tar /usr/local # bzip2 backup.tar
upvoted 3 times
...
Rizos
3 years, 1 month ago
Answer for RHEL8 # cd /usr/local # tar -jcvf /root/backup.tar.bz2 /usr/local # mkdir /test # tar -jxcf /root/backup.tar.bz2 -C /usr/local If you do it the way the original answer says it will return the "cowardly refusing" error
upvoted 2 times
Rizos
3 years, 1 month ago
Last command should be: tar -jxcf /root/backup.tar.bz2 -C /test
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago