JUST OPEN SOURCE MATTERS!

June 2, 2008

How to zip files on linux

Filed under: linux — Tags: , , — egoleo @ 9:55 am

Ziping files on linux using shell is one of the most easy things to do
but today i got a bit confused when a friend asked me how to zip a file with
a different name.
example : normally i zip with the source and target name all been same.

zip -r foobar foobar

which will result in

foobar.zip

but what my friend wanted was having a different name for the result.

So i had to jump straight to the linux channel on IRC. below is what i learnt from there.

zip -r foo.zip bar

which results in foo.zip

what abt unziping too

unzip foo.zip

but what about unziping to have different name .

unzip foo.zip && mv foo bar

2 Comments »

  1. […] Go to the author’s original blog: How to zip files on linux […]

    Pingback by How to zip files on linux — June 2, 2008 @ 10:42 am

  2. Pretty section of content. I just stumbled upon your web site and in
    accession capital to assert that I acquire actually enjoyed account your blog posts.
    Any way I will be subscribing to your augment and even I
    achievement you access consistently fast.

    Comment by rdp — November 8, 2012 @ 8:16 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: