Data Loss Prevention   «Prev 

The tar tape backup command

Generate a list of the linux tar commands for Red hat Linux

Archiving Files using the Red Hat tar command

Archiving Files using the Red Hat tar command

The tar command is useful for bundling up multiple files and/or directories. In a sense, it is similar to the zip command. However, zip files are compressed by definition; tar files can be compressed, but do not have to be. The tar utility does not retain extended attributes by default. Since SELinux contexts are stored in extended attributes, contexts can be lost when archiving files. Use the

tar --selinux 

command to create archives that retain contexts and to restore files from the archives. If a tar archive contains files without extended attributes, or if you want the extended attributes to match the system defaults, use the restorecon utility:
~]$ tar -xvf archive.tar | restorecon -f -

Red Hat Linux Server