GPGDIR(8)

NAME
gpgdir

SYNOPSIS
gpgdir [-e directory ] [-d directory ] [-g directory ] [-n] [-c] [-u] [--Exclude pattern ] [--Exclude-from file ] [-p pw-file ] [-v] [-h]

DESCRIPTION
gpgdir is a perl script that uses the CPAN GnuPG perl module to encrypt and decrypt directories using a gpg key specified in ~/.gpgdirrc. gpgdir recursively descends through a directory in order to make sure it encrypts or decrypts every file in a directory and all of its subdirectories. In order to help save space all files can optionally be compressed using gzip before being encrypted and uncompressed upon decryption through the use of the -c and -u options. Note that gpgdir is careful not encrypt hidden files and directories. After all, you probably don't want your ~/.gnupg directory or ~/.bashrc file to be encrypted.

OPTIONS

-e, --encrypt <directory>
    Encrypt the directory specified on the command line.
-d, --decrypt <directory>
    Decrypt the directory specified on the command line.
-g, --gnupg-dir <directory>
    Specify which .gnupg directory will be used to find GPG keys. The default is ~/.gnupg if this option is not used. This option allows gpgdir to be run as one user but use the keys of another user (assuming permissions are setup correctly, etc.).
-n, --no-recurse
    Instruct gpgdir to not recurse through any subdirectories of the directory that is being encrypted or decrypted.
--Exclude <pattern>
    Instruct gpgdir to skip all files that match pattern as a regex match against each filename. This is similar to the --exclude option in the standard GNU tar command.
--Exclude-from <file>
    Instruct gpgdir to exclude all files matched by patterns listed in file. This is similar to the --exclude-from the GNU tar command.
-c, --compress
    Instruct gpgdir to compress files (using gzip) when encrypting a directory. This is not usually needed since gpg normally compresses files automatically.
-u, --uncompress
    Instruct gpgdir to uncompress files (using gunzip) when decrypting a directory.
-p, --pw-file <pw-file>
    Read decryption password from pw-file instead of typing it on the command line.
-v, --version
    Print version number and exit.
-h, --help
    Print usage information and exit.

FILES
~/.gpgdirrc
    Contains the key id of the user gpg key that will be used to encrypt or decrypt the files within a directory.

EXAMPLES
The following examples illustrate the command line arguments that could be supplied to gpgdir in a few situations: To encrypt a directory: $ gpgdir -e ~/testdir To decrypt a directory: $ gpgdir -d ~/testdir To encrypt a directory but skip all filenames that contain the string "host": $ gpgdir -e ~/testdir --Exclude host To encrypt a directory and no subdirectories: $ gpgdir -e /home/user/testdir --no-recurse To encrypt root's home directory, but use the GPG keys associated with the user "bob": # gpgdir -e /root -g /home/bob/.gnupg

DEPENDENCIES
gpgdir requires that gpg, the Gnu Privacy Guard (http://www.gnupg.org) is installed. gpgdir also requires the GnuPG perl module from CPAN, but it is bundled with gpgdir and is installed in /usr/lib/gpgdir at install-time so it does not pollute the system perl library tree.

SEE ALSO
gpg(1)

AUTHOR
Michael Rash <mbr@cipherdyne.org>

BUGS
Send bug reports to mbr@cipherdyne.org. Suggestions and/or comments are always welcome as well.

DISTRIBUTION
gpgdir is distributed under the GNU General Public License (GPL), and the latest version may be downloaded from http://www.cipherdyne.org