Home > als > als -o

als(1) -o
A script for managing file archives of various types
-o, --option=KEY=VALUE
       Override a configuration option. These are applied after reading the configuration files.

       You can specify this multiple times to override different options.


To extract all files from archive `foobar.tar.gz' to a subdirectory (or the current directory if it only contains one file): aunpack foobar.tar.gz
To extract all files from all `.tar.gz' archives in the current directory: aunpack -e *.tar.gz
To create a zip archive of two files `foo' and `bar': apack myarchive.zip foo bar
To display the file `baz' in the archive `myarchive.zip' through a pager: acat -p myarchive.zip baz
To list contents of the rar archive `stuff.rar': als stuff.rar
To create three archives, `dir1.tar.gz', `dir2.tar.gz' and `dir3.tar.gz', so that the first one contains all files in dir1, the second all in dir2 and the third all dir3: apack -e -F .tar.gz dir1 dir2 dir3
To show all differences between version 2.4.17 and 2.4.18 of the kernel: adiff linux-2.4.17.tar.gz linux-2.4.18.tar.gz
To repack all .tar.gz archives in the current directory to .tar.7z (the old archive will be kept untouched): arepack -F.tar.7z -e *.tar.gz
Here's a shell function that will make the aunpack command change into the directory where files were extracted: aunpack () { TMP=`mktemp /tmp/aunpack.XXXXXXXXXX` atool -x --save-outdir=$TMP "$@" DIR="`cat $TMP`" [ "$DIR" != "" -a -d "$DIR" ] && cd "$DIR" rm $TMP } If you don't have the mktemp program, you can replace the second line with (note however that this is not entirely safe) TMP="/tmp/atool_outdir.$$"

Tips or Questions?

Powered by ExplainShell