Solved

Linux, how to zip or compress files

Posted on 2013-05-17
6
573 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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 27

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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.

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now