1
I would like to compress and encrypt a folder:
tar -cz "/path/to/the/folder/" | gpg --encrypt --passphrase "password" --recipient "mail@mail.mail" > "/destination/package.tar.gz.gpg"
When I decrypt and uncompress, it does not only contains the "folder" that I compressed, but has the full file path: /path/to/the/folder/[whatever]
I prefer avoiding the usage of cd
, the absolute paths seems more clear to me.
How do I remove the full file path from the archive?
see the tar
-C dir
option to effectively cd before tarring. – meuh – 2015-08-21T09:33:09.907