I have a directory that I want to compress to send it by e-mail, I've tried this:
tar -cvf filename.tar.gz directory_to_compress/
But when I try to send it by e-mail, Google says:
filename.tar.gz contains an executable file. For security reasons, Gmail does not allow you to send this type of file.
How to compress a directory into a tar.gz
file from command line?
This question is related to
linux
compression
tar
Try this:
tar -czf my.tar.gz dir/
But are you sure you are not compressing some .exe file or something? Maybe the problem is not with te compression, but with the files you are compressing?
To bypass google's check, which is what you really want, simply remove the extensions from the file when you send it, and add them back after you download it. For example:
Another easy way to circumvent google's check is to use another compression algorithm with tar, like bz2:
tar -cvjf my.tar.bz2 dir/
Note that 'j' (for bz2 compression) is used above instead of 'z' (gzip compression).
Source: Stackoverflow.com