Forrest logo
back to the age tool

age:tldr:4c91e

age: Decrypt a file with a private key file.
$ age --decrypt --identity ${path-to-private_key_file} --output ${path-to-decrypted_file} ${path-to-encrypted_file}
try on your machine

This command is using the "age" tool to decrypt a file using a private key. Let's break down the command step by step:

  1. age: This command invokes the "age" tool, which is used for file encryption and decryption.

  2. --decrypt: This option specifies that we want to decrypt a file. Without this option, the default behavior of the "age" tool is to encrypt files.

  3. --identity ${path-to-private_key_file}: This option specifies the location of the private key file that will be used for decryption. You need to replace ${path-to-private_key_file} with the actual path to your private key file.

  4. --output ${path-to-decrypted_file}: This option specifies the location where the decrypted output file will be saved. You need to replace ${path-to-decrypted_file} with the desired path and filename for the decrypted file.

  5. ${path-to-encrypted_file}: This is the file that you want to decrypt. You need to replace ${path-to-encrypted_file} with the path and filename of the file you want to decrypt.

In summary, this command decrypts a file using a private key and saves the decrypted output to a specified location.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the age tool