quarta-feira, 20 de maio de 2009

Criando e Descompactando arquivos zip, tar, tar.bz, tar.bz2, 7z

Arquivos .zip (é necessário ter instalado unzip/gzip)

Compactar arquivos/pasta na extensão .zip

Para Arquivos

# zip nomedoarquivo.zip nomedoarquivo
ex: zip teste.zip teste.txt

Para Pasta

# zip -r nomedoarquivo.zip nomedapasta
ex: zip -r backup.zip backup

Extraindo

# unzip nomedoarquivo.zip (arquivos/pastas)

Arquivos .tar

Compactar arquivos/pastas na extensão .tar

Para Arquivos e Pastas

# tar -cvf nomedoarquivo.tar nomedoarquivo/pasta
ex: tar -cvf teste.tar teste.txt (arquivo)
ex: tar -cvf backup.tar backup (pasta)

Extraindo

# tar -xvf nomedoarquivo/pasta.tar

Obs: Você pode escolher onde extrair o arquivo .tar utilizando a sintaxe -C.

ex: tar -xvf nomedoarquivo.tar -C /home/usuario/Desktop

Arquivos .tar.gz

Compactar arquivos/pastas na extensão .tar.gz

Para Arquivos e Pastas

# tar -zcvf nomedoarquivo.tar nomedoarquivo/pasta
ex: tar -zcvf teste.tar.gz teste.txt (arquivo)
ex: tar -zcvf backup.tar.gz backup (pasta)

Extraindo

# tar -zxvf nomedoarquivo/pasta.tar.gz

Obs: Você pode escolher onde extrair o arquivo .tar.gz utilizando a sintaxe -C.

ex: tar -zxvf nomedoarquivo.tar.gz -C /home/usuario/Desktop

Arquivos .tar.bz2

Para Arquivos e Pastas

# tar -jcvf nomedoarquivo.tar.bz2 nomedoarquivo/pasta
ex: tar -jcvf teste.tar.bz2 teste.txt (arquivo)
ex: tar -jcvf backup.tar.bz2 backup (pasta)

Extraindo

# tar -jxvf nomedoarquivo/pasta.tar.bz2

Obs: Você pode escolher onde extrair o arquivo .tar.bz2 utilizando a sintaxe -C.

ex: tar -jxvf nomedoarquivo.tar.bz2 -C /home/usuario/Desktop


Arquivos .7z (é necessario instalado o p7zip)

Para Arquivos e Pastas

# 7z a -t7z nomedoarquivo.7z nomedoarquivo/pasta
ex: 7z a -t7z teste.7z teste.txt (arquivo)
ex: 7z a -t7z backup.tar backup (pasta)

Extraindo

# 7z x nomedoarquivo/pasta.7z

Detalhes

Tar
-c - cria um novo arquivo tar;
-v - exibe detalhes da operação;
-x - extrai arquivos de um arquivo tar;
-z - comprime ou extrai arquivos tar resultante com o .tar.gz;
-j - comprime ou extrai arquivos tar resultante com o .tar.bz2;
-f - especifica o arquivo tar a ser usado;


7z
a - Significa criar/adicionar um arquivo;
-t7z - Está dizendo que o tipo do arquivo é classificado como 7zip;
x - Extrair o arquivo .7z na pasta que está;

12 comentários:

Anônimo disse...

I think the admin of this website is genuinely working hard in support
of his website, since here every data is quality based
stuff.

Also visit my web-site - herpes cure

Anônimo disse...

I'm not positive the place you are getting your info, however good topic.
I must spend a while studying much more or working out more.
Thank you for excellent info I was looking for this information for
my mission.

Check out my web site :: the simpsons tapped out cheats

Anônimo disse...

This is the right website for anybody who hopes to find
out about this topic. You know a whole lot its almost
hard to argue with you (not that I really will need to…HaHa).
You certainly put a fresh spin on a topic
that's been written about for ages. Wonderful stuff, just wonderful!
http://loucogame.com/groups/kim-kardashian-gets-surprise-kourtney-kim-take-ohio-clip-video/

Also visit my site - kardashian dresses ()

Anônimo disse...

You can literally get unique treatment from the reputed podiatric
expert and the podiatric doctors can be extra careful about this foot condition. For whichever case, that skin tumor needs to be eliminated before there is emotional
and physical scarring. Although they are mostly out of sight, these warts can cause you some discomfort from the
wart rubbing.

my homepage: http://officialwartrolreviews.com/

Anônimo disse...

Hey There. I discovered your weblog using msn. That is a really smartly written article.
I will make sure to bookmark it and come back to read extra
of your helpful info. Thanks for the post. I will definitely return.

Also visit my web page Chemist Direct Healthcare Products

Anônimo disse...

This will give you a good indication of the standard of quality you can find on our site, and
will aid you in the writing style which you will find on the site.

Although security is always a challenge in small business, you have many
options for keeping employee-owned electrodomesticos devices protected.
Put in your password, where it asks for a secure server ask your ISP for support.


My weblog email hacking ankit fadia

Anônimo disse...

Hi there Dear, are you really visiting this web site regularly,
if so then you will absolutely take fastidious know-how.


Here is my web site :: contract wars cheats

Anônimo disse...

Do you know how many types of electrical motors
are there. In addition keep in mind that a number of ceilings may need to be braced to
guide the extra weight of the ceiling fan. If you sell the $79 vacuums, you are
in the same boat as the battery store.

My website: best ceiling fans for bedrooms

Anônimo disse...

I'νe been browsing on-line more than 3 hours lately, yet I by no means found any attention-grabbing article like yoսrs.

It is beautiful value enough for me. In my view, if all website owners and bloggerѕ maɗe excellent content aѕs үou probably did, the wеb will be much morе helpful than ever befoгe.


My blog - skin care products for rosacea

Anônimo disse...

Ahaa, its pleasant dialogue on the topic of this paragraph at this place at this webpage, I have read all that, so at this time
me also commenting here.

Feel free to visit my site Easy Historical Trips in Los Angeles; ,

Anônimo disse...

Terrific article! That is the type of information that are meant to be shared around the web.

Disgrace on Google for not positioning this publish higher!
Come on ovrr and consult with my website . Thanmks =)

my blog post; stay at home moms

jasonbob disse...

nike basketball shoes
nike lebron 15
jordan shoes
christian louboutin shoes
air jordan
nike air max 2017
golden goose
adidas stan smith
coach purse
nike air max 90
louboutin outlet
xiaofang20191207