Arquivos Compactados
A compactação de arquivos é sem dúvida algo muito útil para transportarmos arquivos. Esse é um processo que permite unir vários arquivos em um único lugar (um novo arquivo) e ocupando um tamanho em disco ainda menor.
Compactando
zip
Sem senha
zip <file.zip> <file1> <file2> <file3>
Com senha
zip -er <file.zip> <file>
tar
tar -cvf </file.tar> --absolute-names <file.txt>
7z
Instalando
sudo apt update
sudo apt install p7zip-full
Com senha
7z a <output.7z> </path/to/crypt> -p'<pass>' -mhe=on
Descompactando
zip
# Listando arquivos
zipinfo <file.zip>
# Descompactando
unzip <file.zip>
unzip <file.zip> -d <folder_output>
gz
tar -xzvf <file.tar.gz>
gunzip <file.gz>
gzip -d <file.gz>
tgz
tar -zxvf <file.tgz>
tar
tar -xvf <file.tar>
tbz
tar -jxvf <file.tbz>
bz2
bzip2 -dkv <file.bz2>
bunzip2 <file.bz2>
cpio
cpio -idv --no-absolute-filename < <cpio_file>
xz
unxz <file.xz>
7z
# Listando arquivos
7za l <file.7z>
# Descompactando
7za x <file.7z>
# Com senha
7z x <output.7z> -p'<pass>'
jar
jar xf <file.jar>
Visualizando Conteúdo
zipinfo
zipinfo <file.zip>
unzip
unzip -l <file.zip>
Last updated
Was this helpful?