Solved

Linux, how to zip or compress files

Posted on 2013-05-17
6
585 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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 
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 30

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

Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

627 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