Basic Syntax and Usage
To create an archive, such as “archive2.star” located in your home directory containing a file called “file1”, use the following command:- The flags
c(create),t(list), andx(extract) are combined with a dash (e.g.,-cv). - Specify the archive location with
file=followed by the desired path. - After the archive location, list the files or directories to be included.
Listing Archive Contents
To view the contents of an archive with a verbose output, use the list flag (t) along with the archive path:
Extracting Archives
To extract the contents ofarchive2.star into the current directory, execute:
/tmp), include a capital C flag followed by the target directory:
Compression Options
Star can compress and decompress archives just like tar. Here are some common usage examples:Creating a Gzipped Archive
To create an archive compressed with gzip, use the-z option:
Creating a Bzip2 Compressed Archive
To archive and compress using bzip2 compression, use the-bz option:
Unpacking Compressed Archives
Star automatically detects the compression type during extraction. For example, to extract a gzip-compressed archive:Remember: Star’s syntax is similar to tar, with the key difference being the order of arguments. Always specify the archive location using
file= before listing the files or directories.