quando descompactado ele vai colocar tudo em uma pasta ja ou nao.5- Descompactar na forma possivel6- Descobrir o nome da pasta aonde os arquivos extraidos ficaramEntao fiz esse script que resume esses 6 passos em apenas 1:extract arquivo.qualquer_coisaele extrai o arquivo no formato que for e ainda MELHOR: se os arquivos nao foram criados com uma pasta raiz, ao inves de ver todos seus arquivos descompactados jogados no seu desktop, ele cria a pasta ANTES e extrai os arquivos la dentro.e depois diz aonde ele esta ;)Por enquanto ele suporta apenas tar.gz, tar.bz2, zip e rar... e facilmente extensivel e o codigo esta bem comentado para ajudar a todos nessa tarefa#!/bin/bash# Extract - Extract many formats of files, and create a root dir # if doesn't exists# # Copyright (C) 2008 Thomaz de Oliveira dos Reis# # This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.# # This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.# # You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USAmain_execute(){ # Parameters: 1- Command to get root directory[ies] inside the compressed file# 2- Filename without extension# 3- Extract command for the previous directory# 4- Extract command for this directory DIRETORIO=`eval $1` if (( `echo "$DIRETORIO" | wc -l` > 1 )) then DIRETORIO=$2 if ! [ -d $DIRETORIO ] then mkdir $DIRETORIO fi cd $DIRETORIO eval $3 >/dev/null else eval $4 >/dev/null fi echo "File(s) extracted at: $DIRETORIO"}tar_execute(){# 1- Command to get root directory[ies] inside the compressed file P1="tar -tf \"$1\" | cut -f1 -d/ | uniq"# 2- Filename without extension P2=`basename $1 | sed 's#.tar.gz$##g;s#.tar.bz2$##g;s#.tgz$##g'`# 3- Extract command for the previous directory P3="tar -$2xf \"../$1\""# 4- Extract command for this directory P4="tar -$2xf \"$1\"" # Running main_execute "$P1" "$P2" "$P3" "$P4"}zip_execute(){# 1- Command to get root directory[ies] inside the compressed file P1="unzip -l \"$1\" | tr -s ' ' | cut -f5- -d' ' | sed 's#Name##g;s#-*##g;/^ *$/d' | cut -f1 -d/ | uniq"# 2- Filename without extension P2=`basename $1 | sed 's#.zip$##g'`# 3- Extract command for the previous directory P3="unzip \"../$1\""# 4- Extract command for this directory P4="unzip \"$1\""# Running main_execute "$P1" "$P2" "$P3" "$P4"}rar_execute(){# 1- Command to get root directory[ies] inside the compressed file P1="unrar vb \"$1\" | cut -f1 -d/ | uniq"# 2- Filename without extension P2=`basename $1 | sed 's#.rar$##g'`# 3- Extract command for the previous directory P3="unrar x \"../$1\""# 4- Extract command for this directory P4="unrar x \"$1\"" # Running main_execute "$P1" "$P2" "$P3" "$P4"}# your_new_extension(){# # 1- Command to get root directory[ies] inside the compressed file# P1="the list of files, one per line,