How to Compress file/folder in Linux
Introduction
A backup, or the process of backing up, refers to the copying and archiving of computer data so it may be used to restore the original after a data loss event. The verb form is to back up in two words, whereas the noun is backup. Backups have two distinct purposes.
- The primary purpose is to recover data after its loss, be it by data deletion or corruption.
- Data loss can be a common experience of computer users.
Following are the methods through which we can compress the file and folders.
1) ZIP a file/folder
#zip file.zip file1 file2
#zip file.zip dir1
#zip -option file.zip dir1
How to zip a file with excluding file/folder
zip -r conference_01-01-2015_14-30.zip /var/www/conference/* -x home_backup/
2) TAR a file/folder
tar -cvf /backup/etc.tar /etc/*
tar -cvf /backup/etc.tar
3) GZIP a file/folder
gzip is the preferred compression tool for Linux. To compress the tar file using gzip, following is the command:
gzip etc.tar
To decompress the tar file using gzip, following is the command:
gzip -d etc.tar.gz
4) BZIP2 a file/folder
There is also another tool that is rapidly gaining acceptance in the Linux world: bzip2. This is supposed to become the official way of doing it in the near future, so it may be a good idea to get to know ‘bzip2’
To compress the tar file using bzip2, following is the command:
bzip2 etc.tar
To decompress the tar file using bzip2, following is the command:
bzip2 -d etc.tar.bz2
It’s very straightforward to find out any matter on net as compared to books, as I found this piece of writing at this website.
Hi there, just became aware of your blog through Google, and
found that it is truly informative. I’m going to
watch out for brussels. I will be grateful if you continue this in future.
Numerous people will be benefited from your writing.
Cheers!
Definitely imagine that which you said. Your favorite reason appeared to be on the net the simplest factor
to be mindful of. I say to you, I definitely get irked even as people think about worries that they plainly don’t understand about.
You controlled to hit the nail upon the top as smartly as
outlined out the entire thing with no need side effect ,
other folks can take a signal. Will likely be again to get more.
Thank you
Ahaa, its fastidious discussion regarding this piece of writing at this place at this webpage, I have
read all that, so at this time me also commenting at this place.
If you would like to take a great deal from this article then you have to apply such methods to
your won weblog.
I have been surfing online more than 3 hours today, yet
I never found any interesting article like yours. It’s pretty worth enough for me.
In my opinion, if all website owners and bloggers made good content as you did, the net will be much more useful
than ever before.
It’s difficult to find experienced people about this topic, but you seem
like you know what you’re talking about! Thanks
hello there and thank you for your information ?
I?ve definitely picked up anything nnew from right here.
I did however expertise a ffew technical points using this web site, since I experienced
to reload the website a lot of times previous to I could get it too load properly.
I had been wondering if your web host is OK? Not that I’m complaining, but slow loading
instances timmes will very frequently affect your placement in googlee andd could damage your high-quality
score if ads and markeing with Adwords. Well I
am adding this RSS to myy e-mail and can look out for muxh more of your respective fascinating content.
Ensure that you update this again soon..
Greetings! This is my first visit to your blog! We are a team of volunteers and
starting a new project in a community in the same niche. Your
blog provided us useful information to work on. You have done a wonderful
job!
If some one wishes to be updated with hottest
technologies therefore he must be visit this web page and be up
to date everyday.
Your method of describing everything in this paragraph is actually good, all be able to effortlessly know it, Thanks
a lot.
Hi every one, here every one is sharing these kinds of knowledge, so it’s good to read this webpage, and I used to
pay a quick visit this webpage daily.
Keepp up the fantastic piece of work, I read few artcles
oon this site and I believe that your web blog is really interesting and contains
sets of excellent info.
Can you tell us more about this? I’d like to find out some
additional information.
Incredible points. Outstanding arguments. Keep up the
good effort.
I’ve read several excellent stuff here. Certainly value bookmarking
for revisiting. I wonder how much attempt you put to create this kind
of wonderful informative web site.
Fastidious answer back in return of this query with firm arguments and explaining the whole thing regarding that.
Spot on with this write-up, I honestly feel this
web site needs a lot more attention. I’ll probably be back again to read through more,
thanks for the advice!
Excellent post. I am facing many of these
issues as well..
Hi there, I desire to subscribe for this website to get most up-to-date updates, thus where can i do it
please help.