public final class Tar extends AbstractProgram
tar
command. It understands a subset
of tar
's command line arguments.
Usage: java -cp [classpath] org.at4j.tar.prog.Tar [-] command [options] pathname [pathname ...] Where: classpath - Should include the at4j, bzip, lzma, entityfs-core and entityfs-util Jars. command - The Tar command. See below. options - Command options. See below. file - The name and path of the Zip file to unzip. Commands: -c --create - Create an archive. This requires the "f" option. -t --list - List the contents of the archive. This requires the "f" option. -x --extract - Extract an archive. This requires the "f" option. Options: --charset name - The name of the charset to use for encoding or decoding file names in the Tar file. If this is not set, the platform's default charset is used. -f --file f - The name and path of the Tar file. -H format --format=format - (when creating an archive) Create an archive using the specified format, where the format is one of the following: 'v7': Unix V7 Tar format 'gnu': Gnu Tar format (default) 'ustar': Posix.1-1988 compatible archive 'posix': Posix.1-2001 compatible archive -j --bzip2 - The Tar file is bzipped. -k --keep-old-files - Don't overwrite existing files when extracting an archive. --lzma - The Tar file is compressed with LZMA compression. --timing - After extracting the files, print out how long it took. -z --gzip - The Tar file is gzipped.
The options can be used in the old tar
condensed style does. For
instance, xfz foo.tar.gz
means
"extract the gzipped Tar file foo.tar.gz".
Constructor and Description |
---|
Tar() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args) |
getArg, getParentLocation, isFlagArgument
public static void main(String[] args)