Solved

Linux, how to zip or compress files

Posted on 2013-05-17
6
581 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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 29

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Fine Tune your automatic Updates for Ubuntu / Debian
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

734 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