From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 1 Deploy, Configure, and Manage (2021)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Archive files using tar
From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 1 Deploy, Configure, and Manage (2021)
Archive files using tar
- We often have to archive files and directories for backup purposes. With other operating systems, such as Windows, we might use zip for this. In Linux we use an archiver to preserve metadata such as ownership, permissions, access control lists, as well as the file data itself. The tool we usually use is "tar" or tape archiver. Tar itself doesn't compress files, but leaves that job up to compression tools. To demonstrate, we're going to create an archive of the slash Etsy directory. Because we're archiving a system directory, we'll need to elevate privileges with sudo. Type in sudo, space, tar, space, --xattrs. Xattrs preserves extended attributes, including access control lists and SELinux security context. Space -c to create an archive, v for verbose, p to save ownership and permissions, and then f for the file name of the archive. We're going to call it Etsy.tar. Space. And then the last argument is going…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Use input-output redirection (>, >>, |, 2>, and more)5m 2s
-
Use grep and regular expressions to analyze text5m 55s
-
(Locked)
Archive files using tar4m 40s
-
(Locked)
Compress files and archives4m 14s
-
(Locked)
Create files and directories5m 18s
-
Copy files and directories5m 48s
-
(Locked)
Move files and directories4m 59s
-
(Locked)
Remove files and directories6m 2s
-
(Locked)
Create hard and soft links4m 55s
-
(Locked)
Introduction to vim3m 33s
-
(Locked)
Editing text with vim2m 45s
-
(Locked)
Locate, read, and use system documentation5m 2s
-
(Locked)
Locate and interpret system log files6m
-
(Locked)
Reading the system journal3m 18s
-
(Locked)
-
-