I wrote a compressing command in Ubuntu. However,the zip file produced also contain path folder leading to the target file in form of folder. I only need the target file alone in the zip file. This is the code I currently using.
zip -9pr /mnt/test/Raimi/temp/Testing.zip /home/tect/Loco/*txt
where mnt/test/Raimi/temp
is the destination folder Testing.zip
is the output I intended to produced and /home/tect/Loco
is the Original file located.
Please help pointed out a fault in my command if found. Thank you in advance.
cd /home/tect/Loco/ && zip -9pr /mnt/test/Raimi/temp/Testing.zip *txt
? – Julie Pelletier Mar 21 '17 at 03:13bash: cd/home/tect/Loco/ : No such file or directory
– mohd raimi Mar 21 '17 at 07:25