How user gpg for encrypt a directory?
example; gpg /home/user/labs-scripts <<< all files in directory or only directory?
thanks for your collaboration.
Given that gpg will only encrypt a single file (or equivalent) the natural solution is to create a gpg encrypted tarball.
First let me show the two step approach.
$ tar -C /home/user -cf scripts.tar labs-scripts/
$ gpg -r 0xabcdef -e scripts.tar
You can also do it in one sweep, by piping the tar steam.
$ tar -C /home/user -cf - labs-scripts/ | gpg -r 0xabcdef -o scripts.tar.gpg -e