0% found this document useful (0 votes)
69 views3 pages

Activity 5 Archiving and Compression

The document discusses archiving and compressing files using various commands like tar, gzip, bzip2, and zip. It provides instructions to create archive files of the /etc/udev directory with and without compression using tar. It also demonstrates how to compress and uncompress individual files using gzip, bzip2, xz and zip utilities. The supplementary activity asks students to archive and backup certain directories and files and move them to different locations.

Uploaded by

Melon Trophy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views3 pages

Activity 5 Archiving and Compression

The document discusses archiving and compressing files using various commands like tar, gzip, bzip2, and zip. It provides instructions to create archive files of the /etc/udev directory with and without compression using tar. It also demonstrates how to compress and uncompress individual files using gzip, bzip2, xz and zip utilities. The supplementary activity asks students to archive and backup certain directories and files and move them to different locations.

Uploaded by

Melon Trophy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Activity No.

5
Archiving and Compression
Course Code: CPE231 Program:
Course Title: SYSTEM ADMINISTRATION FUNDAMENTALS Date Performed:
Section: Date Submitted:
Name: Instructor:
1. Objective(s):

This activity aims to work with archive files.

2. Intended Learning Outcomes (ILOs):


The students should be able to:
2.1 Demonstrate how to create archive files using tar with and without compression
2.2 Demonstrate how compress and uncompress files into different archive files.

3. Discussion :

<create a discussion about archiving and compression of files>

4. Resources:
Personal Computer with installed Virtual Box
Ubuntu Server or Desktop virtual machine

5. Procedure:

1. Login using your username and password.


2. Use terminal emulator application (if you are using desktop version)
3. Execute the following commands to archive and compress files. Copy a screenshot as output after you
execute the given command. Create a brief explanation of the command.

Command Screenshot Explanation


1. cd
2. mkdir
mybackups
3. tar –cvf
mybackups/udev
.tar /etc/udev
4. ls mybackups
1. tar –tvf
mybackups/udev
.tar
2. tar –zcvf
mybackups/udev
.tar.gz /etc/udev
3. ls –lh
mybackups
4. cd mybackups
5. ls
6. tar –xvf
udev.tar.gz
7. ls
8. ls etc
9. ls etc/udev
10. ls
etc/udev/rules.d
11. tar -rvf
udev.tar
/etc/hosts
12. tar –tvf udev.tar
13. cp
/usr/share/dict/w
ords .
14. ls -l words
15. gzip words
16. ls -l words.gz
17. ls -l words.gz
18. gunzip words.gz
19. ls -l words
20. ls -l words
21. bzip2 words
22. ls -l words.bz2
23. ls -l words.bz2
24. bunzip2
words.bz2
25. ls -l words
26. ls -l words
27. xz words
28. ls -l words.xz
29. ls -l words.xz
30. unxz words.xz
31. ls -l words
32. zip words.zip
words
33. ls -l words.zip
34. zip -r udev.zip
/etc/udev
35. ls -l udev.zip
36. unzip -l udev.zip
37. rm -r etc
38. unzip udev.zip

7. Supplementary Activity:

Copy screen shot(s) of the following tasks:

1. Create a directory CPE231 in the Documents directory.


2. Create a directory <lastname> and <firstname> under CPE231 directory.
3. Create two text files: (1) X.txt and (2) Y.txt in the <lastname> directory.
4. Copy the content of <lastname> directory to <firstname> directory.
5. Delete the content of <lastname> directory.
6. Create a directory CPE231_backup in the Documents directory.
7. Copy the content of CPE231 to CPE231_backup directory.
8. Compress the CPE231_backup directory using any archive commands.
9. Remove the CPE231_backup directory.
10. Uncompressed the CPE231_backup archive file to /home/myfiles.

7. Problem Analysis:

1. Discuss the advantages and disadvantages of two archiving techniques.


2. Discuss the factors to consider when archiving selected files.

8. Conclusion

8. Assessment (Rubric for Laboratory Performance):

You might also like