Solved

Linux, how to zip or compress files

Posted on 2013-05-17
6
578 Views
Last Modified: 2013-05-20
I am running RHEL 6.4

I have often uncompressed files with Gunzip and tar

I have a series of about 10 files named *.aaa

How can I compress these file and place them into a single file ?

Thanks
0
Comment
Question by:Los Angeles1
6 Comments
 
LVL 26

Accepted Solution

by:
pony10us earned 167 total points
ID: 39176210
This should work.  

gzip *.aaa > aaa_files.gz
0
 

Author Comment

by:Los Angeles1
ID: 39176340
Did not work, I think I need a tar command to gather the files into one
0
 
LVL 26

Expert Comment

by:pony10us
ID: 39176346
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 40

Expert Comment

by:omarfarid
ID: 39176514
check if you have the zip command on your system

http://linux.die.net/man/1/zip
0
 
LVL 21

Assisted Solution

by:Mazdajai
Mazdajai earned 166 total points
ID: 39176532
tar cvf aaa.tar *.aaa

Open in new window

0
 
LVL 28

Assisted Solution

by:serialband
serialband earned 167 total points
ID: 39176554
Gnu tar (since you're using RHEL) includes zip option.

tar -czvf aaa.tgz *.aaa

You can also bzip it if you want a smaller file size.

tar -cjvf aaa.tbz *.aaa


gzip only works on single files, so you'll have to tar them anyway.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Fine Tune your automatic Updates for Ubuntu / Debian
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question