Is it possible to zip a folder while copying it? I want to copy a folder and then zip it, but this implies that I need for a while twice the space in my /mnt path, right?
/bin/cp -r /mnt/myfolder /mnt/new_folder ; tar -zcvf /mnt/new_folder.zip /mnt/new_folder
Is it possible to avoid this?
Thanks
tar != zip
Imagine how surprised the ZIP user will be when they discover that the.zip
file you sent them actually isn't a.zip
file at all. You'd be well-advised to use a.tgz
or.tar.gz
extension instead. – Jim L. Aug 28 '19 at 19:31