How to send a compressed archive that contains executables so that Google's attachment filter won't reject it

slackmart picture slackmart · May 25, 2012 · Viewed 147.4k times · Source

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?

Answer

Levon picture Levon · May 25, 2012
tar -cvzf filename.tar.gz directory_to_compress/

Most tar commands have a z option to create a gziped version.

Though seems to me the question is how to circumvent Google. I'm not sure if renaming your output file would fool Google, but you could try. I.e.,

tar -cvzf filename.bla directory_to_compress/

and then send the filename.bla - contents will would be a zipped tar, so at the other end it could be retrieved as usual.