Zip data using Command

HI Guys,

I using below command to zip data but in zip file i have entire path of source.

zip $HOME/EM/ZIPData/All.tar.gz /vr/rt/on/mg/set/XM/Swor/xt/0300*.*

In Zip file i have entire path

vr/rt/on/mg/set/XM/Swor/xt/

I just want file data zip in may target location

zip stores paths relative to current directory. so one solution is to change the directory.

( cd /var/rt/on/mg/set/XM/Swor/xt && zip "$HOME/EM/ZIPData/All.zip" 0300* )
1 Like

Perfect!!!! Thanks