From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Archiving files with tar

Archiving files with tar - Linux Tutorial

From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Start my 1-month free trial

Archiving files with tar

- [Instructor] We often have to archive files and directories for backup purposes. With other operating systems such as Windows, we might use the ZIP tool for this. In Linux, we use and 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 the compression tools. To demonstrate, we're going to create an archive of the slash EDC directory. And in Terminal, type in "sudo" space "tar" space dash dash "xattrs" space dash "c" for create, "v" for verbose, "p" for permissions, and "f" followed by the archive file name. We'll call it "etc.tar" space and the next argument is what we want to include in the archive. In our case it's the slash etc directory. Hit enter, then type in your password as prompted. It's a good idea to preserve metadata.…

Contents