vendredi 30 janvier 2015

Zip the contents of a folder without including the folder itself


I have a directory called folder that looks like this:



folder
-> root_folder
-> some files


I want to zip this directory into zipped_dir, I tried:



zip -r zipped_dir.zip folder/*


But this generates a ZIP that looks like this:



zipped_dir
-> folder
-> root_folder
-> some files


in other words, it's including the directory whose contents I want to zip. How can I exclude this parent directory from the ZIP, without moving anything?


IE I would like this end result:



zipped_dir
-> root_folder
-> some files


Aucun commentaire:

Enregistrer un commentaire