How to zip the directory in linux with command line

In this tutorial we will learn,how to zip the directory in linux with command line.Zip is a compression and file packaging utility for Linux,Unix,Windows and various Operating system. The zip helps to compress and reduce the size of file and directory.To zip a directory,first of all we will check ,do we have zip command installed in Linux system.

Note: For more detailed zip examples with command line, read out this post (How to zip directory in linux explained with examples).


The below command will help to find is zip installed or not.

# which zip   (It will show the absolute path of zip)

In CentOS

# rpm -q zip

In Debian or Ubuntu

$ sudo dpkg -l zip

If you find it is not installed in system then install with given below command.

In CentOS or Red hat
# yum install zip

In Debian or Ubuntu
$ sudo apt-get install zip

After confirmation of installed zip package,now we will zip or compress the directory in Linux system.
Use the given below command.

zip -r GiveAnyName.zip  /path/of/Directory

for eg.
 We have a backup directory in /root/ (i.e /root/backup)

zip -r backup.zip /root/backup

The command will compress the directory with extension .zip .
In above given eg. the compressed file name would be backup.zip


Comments (89)

  • affiliate programs

    I am now not certain the place you’re getting your information, however good topic.
    I must spend a while learning much more or figuring out more.
    Thank you for excellent info I used to be on the lookout for this information for my mission.

  • medical care

    Hi there to every one, it’s in fact a pleasant
    for me to pay a visit this web site, it contains useful Information.

  • hp q7553a toner

    Today, I went to the beachfront with my kids. I found
    a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put
    the shell to her ear and screamed. There was a hermit crab inside and
    it pinched her ear. She never wants to go back!
    LoL I know this is entirely off topic but I had to tell
    someone!

  • mobile phones omitted

    Hi, all is going perfectly here and ofcourse every one
    is sharing information, that’s actually excellent, keep up writing.

  • Install xfce4-screenshooter.deb

    I love what you guys tend to be up too. This type of clever work and exposure!
    Keep up the excellent works guys I’ve incorporated
    you guys to our blogroll.

  • air travel

    You need to be a part of a contest for one of the most useful websites on the web.
    I will recommend this site!

  • bathroom furniture

    Excellent post. I will be facing many of these issues as well..

  • Interior designer in Chennai

    Pretty nice post. I just stumbled upon your
    blog and wished to say that I have truly enjoyed surfing around
    your blog posts. In any case I’ll be subscribing to your feed and I hope you write again very soon!

  • money making blogs

    Howdy very cool site!! Man .. Beautiful .. Amazing ..
    I’ll bookmark your website and take the feeds additionally?
    I’m satisfied to seek out numerous useful info right
    here within the post, we want work out more techniques on this regard, thank
    you for sharing. . . . . .

  • body massage hong

    continuously i used to read smaller articles or reviews which also
    clear their motive, and that is also happening with this
    post which I am reading at this place.

  • packers and movers in Pune

    Thank you, I’ve just been searching for information about this topic for a while and yours is the best I’ve
    found out till now. However, what concerning the conclusion?
    Are you certain about the supply?

  • app-reviews site

    We stumbled over here by a different web address
    and thought I might as well check things out.

    I like what I see so now i’m following you. Look forward to looking at your web page for a second time.

  • slow computer

    Hi there, I would like to subscribe for this web
    site to take latest updates, so where can i do
    it please assist.

  • buy android tablets

    you’re really a just right webmaster. The website loading pace is amazing.
    It seems that you are doing any distinctive trick. Also, The contents are masterpiece.

    you’ve done a excellent job on this matter!

  • mobile apps for blackberry storm

    This excellent website definitely has all the information and
    facts I needed about this subject and didn’t know who to ask.

  • successful forex

    This is very interesting, You are a very skilled blogger.
    I’ve joined your rss feed and look forward to seeking more of your excellent post.
    Also, I’ve shared your website in my social networks!

  • make money by writing articles

    Touche. Outstanding arguments. Keep up the good effort.

  • minecraft

    Hello, i think that i saw you visited my blog thus i came to “return the favor”.I’m attempting to find things
    to improve my web site!I suppose its ok to use some of your ideas!!

  • minecraft

    Very descriptive post, I enjoyed that a lot.
    Will there be a part 2?

  • minecraft

    Normally I do not learn post on blogs, however I would like to
    say that this write-up very pressured me to check out and do it!
    Your writing style has been amazed me. Thanks,
    very great article.

  • minecraft

    This design is wicked! You most certainly know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved to
    start my own blog (well, almost…HaHa!) Wonderful
    job. I really loved what you had to say, and more than that, how you presented it.
    Too cool!

  • minecraft

    Hey, I think your blog might be having browser compatibility issues.
    When I look at your blog site in Chrome, it looks fine but when opening in Internet Explorer, it has some overlapping.

    I just wanted to give you a quick heads up! Other then that, fantastic blog!

  • minecraft

    hello there and thank you for your info – I’ve definitely picked up something
    new from right here. I did however expertise a few technical points using this site,
    as I experienced to reload the web site lots of times previous to I could get it to load
    correctly. I had been wondering if your web host is
    OK? Not that I’m complaining, but slow loading instances times will sometimes affect your placement in google
    and can damage your high-quality score if ads and marketing with Adwords.
    Well I’m adding this RSS to my e-mail and can look out for much more of your respective fascinating content.
    Ensure that you update this again very soon.

  • minecraft

    Outstanding story there. What occurred after? Thanks!

  • ipad advantages

    Thank you for some other informative site. Where else may
    I get that type of information written in such a perfect manner?
    I’ve a mission that I’m just now working on, and I’ve been at
    the glance out for such information.

  • minecraft

    Nice blog here! Also your site loads up very fast!
    What host are you using? Can I get your affiliate link to your
    host? I wish my web site loaded up as quickly as yours lol

  • minecraft

    Howdy, i read your blog from time to time and i own a
    similar one and i was just curious if you get a lot of spam remarks?
    If so how do you stop it, any plugin or anything you can recommend?
    I get so much lately it’s driving me mad so any help
    is very much appreciated.

  • minecraft

    Thank you for the good writeup. It in fact was a amusement account it.
    Look advanced to more added agreeable from you!
    By the way, how could we communicate?

  • Buy android installs

    A person necessarily help to make severely posts I might state.
    This is the first time I frequented your web page and to this
    point? I amazed with the research you made to create this particular submit incredible.
    Fantastic activity!

  • minecraft

    Appreciating the time and energy you put into your blog and detailed information you provide.

    It’s good to come across a blog every once in a while that isn’t the same old rehashed information. Wonderful read!

    I’ve saved your site and I’m including your RSS feeds to
    my Google account.

  • buy app reviews online

    I’d like to find out more? I’d want to find out more details.

  • minecraft

    Hi, I wish for to subscribe for this webpage to get most recent updates,
    so where can i do it please help out.

  • buy ios reviews

    Hi, I would like to subscribe for this blog to get most recent updates, so where can i do it please help.

  • minecraft

    Paragraph writing is also a fun, if you be acquainted with after that you can write if not it
    is difficult to write.

  • minecraft

    hello there and thank you for your info – I’ve definitely picked up something
    new from right here. I did however expertise a few technical
    issues using this site, as I experienced to reload the site many times previous to I could get it to load properly.
    I had been wondering if your web hosting is OK? Not that I am complaining, but sluggish loading instances times will very
    frequently affect your placement in google and could damage
    your quality score if ads and marketing with Adwords. Well I am adding this
    RSS to my e-mail and can look out for much more of your respective intriguing content.
    Make sure you update this again very soon.

  • minecraft

    Greate article. Keep posting such kind of information on your page.

    Im really impressed by your blog.
    Hello there, You have performed a fantastic job. I will definitely digg
    it and in my opinion suggest to my friends. I’m confident they’ll be benefited from this site.

  • minecraft

    Truly when someone doesn’t know afterward its up to other viewers that they will
    assist, so here it takes place.

  • yeezy boost 350

    I just wanted to develop a simple comment in order to appreciate you for some of the amazing hints you are sharing on this website. My considerable internet lookup has at the end been compensated with extremely good points to go over with my friends and family. I would assert that many of us site visitors are undeniably blessed to live in a useful website with many marvellous people with beneficial hints. I feel pretty lucky to have seen your entire webpages and look forward to plenty of more excellent minutes reading here. Thanks once again for a lot of things.

  • minecraft

    I have read a few good stuff here. Definitely value bookmarking for
    revisiting. I wonder how so much effort you set to make such
    a fantastic informative website.

  • minecraft

    Thanks for sharing such a fastidious idea, paragraph is
    nice, thats why i have read it fully

  • minecraft

    Why viewers still make use of to read news papers when in this technological world
    the whole thing is presented on net?

  • minecraft

    Great goods from you, man. I have understand your stuff previous to
    and you are just too great. I really like what you’ve acquired here,
    really like what you’re stating and the way in which
    you say it. You make it entertaining and you still care for to keep it wise.
    I cant wait to read much more from you. This is really a great web site.

  • minecraft

    I was suggested this website by my cousin. I am not sure whether this post is
    written by him as no one else know such detailed about my
    difficulty. You’re amazing! Thanks!

  • minecraft

    With havin so much written content do you ever run into any problems of plagorism
    or copyright violation? My website has a lot of exclusive content I’ve either written myself or outsourced but
    it looks like a lot of it is popping it up all over
    the internet without my permission. Do you know any solutions to
    help prevent content from being stolen? I’d definitely appreciate it.

  • minecraft

    I’m really loving the theme/design of your website.

    Do you ever run into any internet browser compatibility issues?
    A number of my blog visitors have complained about my site not operating correctly in Explorer
    but looks great in Safari. Do you have any advice to help fix this issue?

  • minecraft

    You could definitely see your enthusiasm in the article you write.
    The arena hopes for even more passionate writers such as you
    who are not afraid to mention how they believe. At all times follow your heart.

  • minecraft

    Hello to every body, it’s my first visit of this website; this
    weblog consists of awesome and genuinely fine stuff in favor of visitors.

  • minecraft

    Hello, I would like to subscribe for this weblog to take hottest updates, thus where
    can i do it please help out.

  • minecraft

    Undeniably imagine that which you said. Your favorite justification appeared to be on the web the simplest factor to keep in mind of.

    I say to you, I definitely get annoyed whilst
    other people consider concerns that they just do not
    recognise about. You controlled to hit the nail upon the highest and also defined out the whole thing without having side effect , folks could take a signal.
    Will likely be back to get more. Thanks

  • minecraft

    Wow, wonderful weblog structure! How lengthy
    have you ever been blogging for? you made running a blog
    look easy. The whole look of your website is wonderful, as smartly
    as the content material!

  • minecraft

    It’s very simple to find out any topic on web as compared to books,
    as I found this article at this web page.

  • minecraft

    Appreciation to my father who shared with me about this blog, this website is
    truly remarkable.

  • minecraft

    Hi there! I’m at work browsing your blog from my new iphone 4!
    Just wanted to say I love reading through your blog and look forward to all
    your posts! Carry on the fantastic work!

  • minecraft

    This is really interesting, You are a very skilled blogger.

    I have joined your rss feed and look forward to seeking more of your wonderful post.
    Also, I have shared your web site in my social networks!

  • worthy mobile

    My family members always say that I am wasting my time here at net, but
    I know I am getting experience every day by reading
    thes nice content.

  • minecraft

    Very good information. Lucky me I came across your website by
    chance (stumbleupon). I have book marked it for later!

  • iphone app tester

    My coder is trying to persuade me to move to .net from PHP.
    I have always disliked the idea because of the costs. But he’s tryiong
    none the less. I’ve been using WordPress on a variety
    of websites for about a year and am nervous about switching to another platform.
    I have heard very good things about blogengine.net.
    Is there a way I can transfer all my wordpress content into it?
    Any help would be really appreciated!

  • minecraft

    My brother recommended I would possibly like this blog. He was once totally right.
    This put up truly made my day. You cann’t believe simply how a lot time I had spent for this information! Thank
    you!

  • minecraft

    I’m now not certain where you are getting your information, however great topic.

    I needs to spend a while studying more or working out more.
    Thank you for magnificent info I was looking for this info for
    my mission.

  • Buy android installs

    Hello there! Quick question that’s completely off topic. Do you know how to make
    your site mobile friendly? My blog looks weird when browsing from my iphone4.
    I’m trying to find a template or plugin that might
    be able to correct this issue. If you have any suggestions, please share.

    Thanks!

  • minecraft

    Hey There. I found your blog using msn. This is a very well written article.
    I’ll make sure to bookmark it and return to read more of
    your useful information. Thanks for the post. I’ll certainly comeback.

  • minecraft

    Hey I know this is off topic but I was wondering if
    you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.

    I’ve been looking for a plug-in like this
    for quite some time and was hoping maybe you would have some experience with something like this.
    Please let me know if you run into anything.
    I truly enjoy reading your blog and I look forward to your new
    updates.

  • minecraft

    Hey there would you mind stating which blog platform you’re working with?
    I’m going to start my own blog soon but I’m having a
    hard time choosing between BlogEngine/Wordpress/B2evolution and Drupal.

    The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique.
    P.S Apologies for being off-topic but I had to ask!

  • minecraft

    My brother recommended I may like this web site. He was totally right.
    This put up truly made my day. You cann’t imagine just how much time I had spent for this information!
    Thanks!

  • minecraft free download 2018

    It’s appropriate time to make some plans for the future
    and it is time to be happy. I’ve read this post and if I
    could I wish to suggest you some interesting things or tips.
    Maybe you could write next articles referring to this
    article. I want to read even more things about it!

  • minecraft free download 2018

    That is a good tip particularly to those new to the blogosphere.
    Brief but very accurate information… Thanks for sharing
    this one. A must read article!

  • minecraft free download 2018

    I enjoy, result in I discovered exactly what I was taking a look for.
    You have ended my four day lengthy hunt! God Bless you man. Have a nice day.
    Bye

  • Buy ios installs

    I do believe all of the ideas you have offered for your post.

    They’re really convincing and can certainly work.
    Nonetheless, the posts are very quick for novices. Could you please
    lengthen them a bit from next time? Thank you for the
    post.

  • minecraft free download 2018

    I’m extremely impressed along with your writing abilities as well as with the format on your blog.
    Is that this a paid subject or did you modify it yourself?

    Anyway keep up the excellent high quality writing, it’s rare to peer a nice
    weblog like this one today..

  • minecraft free download 2018

    Hi there would you mind letting me know which hosting company you’re using?

    I’ve loaded your blog in 3 completely different internet browsers
    and I must say this blog loads a lot faster then most. Can you suggest
    a good web hosting provider at a reasonable price?

    Thanks, I appreciate it!

  • minecraft free download 2018

    Good day! I know this is kinda off topic but I’d figured I’d ask.
    Would you be interested in exchanging links or maybe
    guest writing a blog article or vice-versa? My blog covers a lot of the same topics
    as yours and I believe we could greatly benefit from each other.
    If you are interested feel free to send me an e-mail.

    I look forward to hearing from you! Fantastic blog by
    the way!

  • minecraft free download 2018

    I am curious to find out what blog platform you happen to be working with?
    I’m experiencing some minor security issues with my
    latest blog and I would like to find something more safe.
    Do you have any solutions?

  • minecraft free download 2018

    Great delivery. Sound arguments. Keep up the amazing work.

  • minecraft free download 2018

    Great goods from you, man. I’ve be mindful your stuff prior
    to and you’re just too great. I actually like what you have obtained right here, certainly like what you’re stating and the best way through which you say it.

    You make it enjoyable and you still take care of to keep
    it sensible. I can not wait to learn far more from you.
    That is actually a tremendous website.

  • buy android reviews

    I was curious if you ever considered changing the page layout of your blog?

    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of
    content so people could connect with it better.
    Youve got an awful lot of text for only having 1 or
    2 images. Maybe you could space it out better?

  • tinder dating site

    An outstanding share! I have just forwarded this onto a
    co-worker who had been doing a little research on this.
    And he actually ordered me breakfast simply because I discovered it for him…
    lol. So allow me to reword this…. Thanks for the meal!!
    But yeah, thanx for spending time to discuss this matter here on your web site.

  • tinder dating site

    I think the admin of this web site is genuinely working hard for
    his web page, since here every material is quality based material.

  • tinder dating site

    Wow, that’s what I was exploring for, what a data!
    existing here at this webpage, thanks admin of this web page.

  • minecraft secret free download

    I like the helpful info you provide in your articles.
    I will bookmark your blog and check again here frequently.

    I am quite sure I’ll learn many new stuff right here!
    Good luck for the next!

  • minecraft secret free download

    That is a good tip particularly to those new to the blogosphere.

    Short but very precise information… Thanks
    for sharing this one. A must read article!

  • Coconut Oil Benefits

    I’m excited to find this page. I wanted to thank you for your time for this
    wonderful read!! I definitely liked every bit of it and i also have you book marked to check out new information on your website.

  • Coconut Oil

    I am sure this article has touched all the internet users, its really really nice
    piece of writing on building up new weblog.

  • What Equipment is Needed for Sling TV

    Simply wish to say your article is as astonishing. The clarity in your post is simply cool and i could assume you’re an expert on this subject.
    Fine with your permission allow me to grab your feed to keep updated with forthcoming post.
    Thanks a million and please continue the gratifying work.

  • Sling TV

    Do you have any video of that? I’d love to find
    out some additional information.

  • Sling TV

    Its not my first time to visit this web page, i am browsing this
    site dailly and obtain nice facts from here all the time.

  • What Equipment is Needed for Sling TV

    This paragraph is really a good one it helps new the web viewers,
    who are wishing for blogging.

  • Google

    Google

    Always a big fan of linking to bloggers that I love but do not get a whole lot of link really like from.

  • Google

    Google

    One of our visitors lately encouraged the following website.

  • Google

    Google

    The info talked about within the write-up are several of the ideal offered.

Leave a Reply