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
Alternatively, you could create a temporary symbolic link to your file:
ln -s /data/to/zip/data.txt data.txt zip /dir/to/file/newZip !$ rm !$
This works also for a directory.