Create zip file and ignore directory structure
Using -j
won't work along with the -r
option.
So the work-around for it can be this:
cd path/to/parent/dir/;zip -r complete/path/to/name.zip ./* ;cd -;
Or in-line version
cd path/to/parent/dir/ && zip -r complete/path/to/name.zip ./* && cd -
you can direct the output to /dev/null
if you don't want the cd -
output to appear on screen