42.0k views
4 votes
Use tar to create a full compressed back up of the /var/log folder. Use the bzip2 compression. The name of the archive should be YOURFIRSTNAME.Tar and it should be saved in the /home/backups folder (you would need to create the /home/backups folder first):

User Cubski
by
4.3k points

1 Answer

1 vote

Answer:

mkdir ~/home/backups

tar -cjf YOURFIRSTNAME.tar.bz /var/log

mv YOURFIRSTNAME.tar.bz ~/home/backups

Step-by-step explanation:

The bash script makes a new directory called backups in the home directory then archives and compresses the log files in the /var/log folder. Then the compressed file is moved to the newly created backups folder.

User Sasha Chedygov
by
4.2k points