How to create ZIP archive with relative paths

One question in SE site give me idea how to zip folder w/o including the current directory in the path. Here is the question:
I have a directory called folder that looks like this:
folder
      -> root_folder
                    -> some files
I want to zip this directory into zipped_dir..


And the answer I found was sample and effective:

Try to use this command (you will get the idea)
cd folder; zip -r ../zipped_dir.zip *
Maybe there is other way, but this is fastest and simplest for me :)

The lesson is that people must learn how to use relative directories :)
P.S. Here is the link to the Q/A in SE .

No comments:

Post a Comment

Compressed tar archive

There are some cases when you want to create compressed tar archive but you do not have enough disk space to keep original files and tar arc...