Suppose the structure:
/foo/bar/
--file1
--file2
--file3
--folder1
--file4
--folder2
--file5
I want to run the unix zip utility, compressing the bar
folder and all of it's files and subfolders, from foo
folder, but not have the bar
folder inside the zip, using only command line.
If I try to use the -j
argument, it doesn't create the bar folder inside the zip as I want, but doesn't create folder1
and folder2
. Doing -rj
doesn't work.
(I know I can enter inside bar and do zip -r bar.zip .
I want to know if it's possible to accomplish what $/foo/bar/ zip -r bar.zip .
but doing it from $/foo).