• [^] # Re: J’ajoute unp

    Posté par . En réponse au journal cpio c'est mieux que tar. Évalué à 2.

    Y'a aussi "atool", par exemple "atool -x archive.zip" et hop.

    Et en plus (et surtout), atools évite les Tarbomb.

    J'ai une fonction shell qui va bien :


    ax () {
    if [ $# -eq 0 ]
    then
    echo 'Gimme a file to unpack !'
    return
    fi
    if [ ! -x /usr/bin/atool ]
    then
    echo 'Need "atool"'
    return
    fi
    if [ ! -x /bin/mktemp ]
    then
    echo 'Need "mktemp"'
    return
    fi
    TMP=`mktemp /tmp/aunpack.XXXXXXXXXX`
    atool -x --save-outdir=$TMP "$@"
    DIR="`cat $TMP`"
    [ "$DIR" != "" -a -d "$DIR" ] && cd "$DIR"
    rm -i -rf $TMP
    }


    Et du coup, "ax toto.tgz" extrait toto.tgz et me place dans le répertoire créé.

    (oui, c'est de la flemme)