• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 609
  • Last Modified:

Linux, how to zip or compress files

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
Los Angeles1
Asked:
Los Angeles1
3 Solutions
 
pony10usCommented:
This should work.  

gzip *.aaa > aaa_files.gz
0
 
Los Angeles1Author Commented:
Did not work, I think I need a tar command to gather the files into one
0
 
pony10usCommented:
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
omarfaridCommented:
check if you have the zip command on your system

http://linux.die.net/man/1/zip
0
 
MazdajaiCommented:
tar cvf aaa.tar *.aaa

Open in new window

0
 
serialbandCommented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now