star command in Linux

Back

The star command is more appropriate for archiving files in a Selinux system. As the star command is not normally installed, you'll need to install it, one method is tyhe following command

# yum install star

Unfortunately, the star command does not quite work in the same fashion as tar. If you ever have to use the start command, some practice is appropriate. 

For example :
The following command would create an archive , with all Selinux contexts , from the current /home directory.

# star -xattr -H=exustar -c -f=home.star /home/

The -xattr switch saves the extended attribute associated with ACL's. The - c creates a new archives file. The -f specifies the name of the archive file.

Once the archive is created, it can be unpacked with the following command which extracts the archive.

# star -x -f=home.star

The star - x command can detect and restore files from archives configured with various compression schemes.


Star by default uses a fifo to optimize data flow from/to tape. This results in a normally streaming tape during the whole backup. See -fifo and fs= option to get information on how to find the best fifo size.

Star has no limitation on file-name length. Path names and link names up to PATH_MAX (1023 bytes with old OS versions and 4095 bytes with POSIX.1-2001) may be archived. Later versions may be able to deal with longer path names.

Star makes it easy to repair corrupted file systems. After a fsck -y has been run on the file system, star is able to restore only the missing files automatically. Use then b to check for differences. 

star automatically recognizes the type of the archive. star therefore is able to handle features and properties of different archive types in their native mode, if it knows about the peculiarities of the archive type. 

See the H=headertype option for more details. To be able to do this, star adds hidden fingerprints to the archive header that allows to recognize all star specific archive formats. The GNU tar format is recognized by the way it deviates from the standard.

star automatically recognizes and handles byte swapped archives. There is no option to manually control byte swapping.

star automatically recognizes and handles compressed archives inside plain files.