I want to create a ZIP archive of a directory without going into the directory itself, and not include that directory Zip the contents of a folder without including the folder itself - This post guides to changed the current directory and then create the archive. But, as stated earlier, i do not want to change the current directory.This is the structure of the directory that I want to archiveparentdir/parentdir/dir1/parentdir/dir1/file1.txtparentdir/dir1/file2.txtparentdir/dir2/parentdir/dir2/file1.txtparentdir/dir2/file2.txtAnd the desired archive would containdir1/dir1/file1.txtdir1/file2.txtdir2/dir2/file1.txtdir2/file2.txtIf I use the commandzip -r output.zip parentdir/this includes the parentdir as well in the archive.Is there any flag that allows us to create an archive without the parentdir ? I do not want to change the current directory to the parentdir. I cannot also use the -j flag,since I do not want to junk the rest of the paths. Can i accomplish this from any directory?
Zip the contents of a directory without the directory itself
command line;zip