Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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 (?) , you can switch to a simple comment.
Switch to a voting comment New
adolfoale
Highly Voted 3 years, 3 months ago
# tar -cjvf /root/backup.tar.bz2 /usr/local
upvoted 30 times
lordstans
2 years, 10 months ago
This is the right answer
upvoted 3 times
...
gunwantk
2 years, 6 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, 9 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
...
...
VforVodoo
8 months, 1 week ago
file /root/backup.tar.bz2 ##to check file information, it should show "bzip2 compressed data..."
upvoted 1 times
...
...
hitode
Most Recent 7 months, 3 weeks ago
#tar -cavf /root/backup.tar.bz2 /usr/local
upvoted 1 times
...
Gustavo_13
2 years, 1 month ago
tar -jcvf /root/backup.tar.bz2 /usr/local
upvoted 2 times
...
Hammer84
2 years, 5 months ago
tar -cjf /root/backup.tar.bz2 /usr/local
upvoted 4 times
brahmimedamine
2 years, 5 months ago
can you explain more please
upvoted 1 times
...
...
Ares23
2 years, 11 months ago
tar -cvf /root/backup.tar /usr/local && bzip2 /root/backup.tar
upvoted 3 times
...
ms200
3 years, 3 months ago
# tar -cjvf /root/backup.tar /usr/local # bzip2 backup.tar
upvoted 3 times
...
Rizos
3 years, 5 months 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, 5 months 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 ...