Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 612
  • 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
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

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