I need to create a zip file using this command:
zip /dir/to/file/newZip /data/to/zip/data.txt
This works, but the created zip file creates
Somewhat related - I was looking for a solution to do the same for directories. Unfortunately the -j option does not work for this :(
-j
Here is a good solution on how to get it done: https://superuser.com/questions/119649/avoid-unwanted-path-in-zip-file