Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The import command saves screenshot in a file. Is there a way to encrypt that file at the same time using gpg, without saving the image file first? gpg accepts input from stdin but it seems that import doesn't support writing files to stdout, so I can't pipe output of the import to gpg.

share|improve this question
up vote 2 down vote accepted

The import command on my system supports writing to stdout. Just use - as the filename. You'll probably want to prefix that with the image format you want, e.g.:

import png:- | gpg ...
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.